No deprecation warnings, but one spec still fails (but only when I run all the specs, not when I run just the one spec)

This commit is contained in:
khall 2014-08-25 13:34:27 -07:00
parent c42916df27
commit 4edd824d3c
6 changed files with 7 additions and 8 deletions

View file

@ -16,7 +16,7 @@ describe RegistrationsController, :type => :controller do
:password_confirmation => "password" :password_confirmation => "password"
} }
} }
Webfinger.stub_chain(:new, :fetch).and_return(FactoryGirl.create(:person)) allow(Webfinger).to receive_message_chain(:new, :fetch).and_return(FactoryGirl.create(:person))
end end
describe '#check_registrations_open!' do describe '#check_registrations_open!' do

View file

@ -71,7 +71,7 @@ describe ServicesController, :type => :controller do
let(:provider) { {'provider' => 'twitter'} } let(:provider) { {'provider' => 'twitter'} }
before do before do
access_token.stub_chain(:response, :header).and_return header allow(access_token).to receive_message_chain(:response, :header).and_return header
request.env['omniauth.auth'] = omniauth_auth.merge!( provider).merge!( extra ) request.env['omniauth.auth'] = omniauth_auth.merge!( provider).merge!( extra )
end end

View file

@ -1,12 +1,12 @@
require 'spec_helper' require 'spec_helper'
describe TagsController do describe TagsController, :type => :request do
describe 'will_paginate people on the tag page' do describe 'will_paginate people on the tag page' do
let(:people) { (1..2).map { FactoryGirl.create(:person) } } let(:people) { (1..2).map { FactoryGirl.create(:person) } }
let(:tag) { "diaspora" } let(:tag) { "diaspora" }
before do before do
Stream::Tag.any_instance.stub(people_per_page: 1) allow_any_instance_of(Stream::Tag).to receive_messages(people_per_page: 1)
expect(Person).to receive(:profile_tagged_with).with(/#{tag}/).twice.and_return(people) expect(Person).to receive(:profile_tagged_with).with(/#{tag}/).twice.and_return(people)
end end

View file

@ -396,7 +396,7 @@ describe Post, :type => :model do
end end
it "raises Diaspora::NonPublic for a non-existing id without a user" do it "raises Diaspora::NonPublic for a non-existing id without a user" do
Post.stub where: double(includes: double(first: nil)) allow(Post).to receive_messages where: double(includes: double(first: nil))
expect { expect {
Post.find_by_guid_or_id_with_user 123 Post.find_by_guid_or_id_with_user 123
}.to raise_error Diaspora::NonPublic }.to raise_error Diaspora::NonPublic

View file

@ -84,7 +84,7 @@ describe User::Connecting, :type => :model do
describe '#register_share_visibilities' do describe '#register_share_visibilities' do
it 'creates post visibilites for up to 100 posts' do it 'creates post visibilites for up to 100 posts' do
Post.stub_chain(:where, :limit).and_return([FactoryGirl.create(:status_message)]) allow(Post).to receive_message_chain(:where, :limit).and_return([FactoryGirl.create(:status_message)])
c = Contact.create!(:user_id => alice.id, :person_id => eve.person.id) c = Contact.create!(:user_id => alice.id, :person_id => eve.person.id)
expect{ expect{
alice.register_share_visibilities(c) alice.register_share_visibilities(c)

View file

@ -132,8 +132,7 @@ describe Workers::HttpMulti do
person.serialized_public_key = "-----BEGIN RSA PUBLIC KEY-----\nPsych!\n-----END RSA PUBLIC KEY-----" person.serialized_public_key = "-----BEGIN RSA PUBLIC KEY-----\nPsych!\n-----END RSA PUBLIC KEY-----"
person.save person.save
# Should be possible to drop when converting should_receive to expect(...).to allow(@salmon).to receive(:xml_for).and_call_original
RSpec::Mocks.proxy_for(Salmon::EncryptedSlap).reset
Typhoeus.stub(person.receive_url).and_return @response Typhoeus.stub(person.receive_url).and_return @response
Typhoeus.stub(@people[1].receive_url).and_return @response Typhoeus.stub(@people[1].receive_url).and_return @response