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:
parent
c42916df27
commit
4edd824d3c
6 changed files with 7 additions and 8 deletions
|
|
@ -16,7 +16,7 @@ describe RegistrationsController, :type => :controller do
|
|||
: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
|
||||
|
||||
describe '#check_registrations_open!' do
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ describe ServicesController, :type => :controller do
|
|||
let(:provider) { {'provider' => 'twitter'} }
|
||||
|
||||
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 )
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe TagsController do
|
||||
describe TagsController, :type => :request do
|
||||
describe 'will_paginate people on the tag page' do
|
||||
let(:people) { (1..2).map { FactoryGirl.create(:person) } }
|
||||
let(:tag) { "diaspora" }
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ describe Post, :type => :model do
|
|||
end
|
||||
|
||||
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 {
|
||||
Post.find_by_guid_or_id_with_user 123
|
||||
}.to raise_error Diaspora::NonPublic
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ describe User::Connecting, :type => :model do
|
|||
|
||||
describe '#register_share_visibilities' 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)
|
||||
expect{
|
||||
alice.register_share_visibilities(c)
|
||||
|
|
|
|||
|
|
@ -132,8 +132,7 @@ describe Workers::HttpMulti do
|
|||
person.serialized_public_key = "-----BEGIN RSA PUBLIC KEY-----\nPsych!\n-----END RSA PUBLIC KEY-----"
|
||||
person.save
|
||||
|
||||
# Should be possible to drop when converting should_receive to expect(...).to
|
||||
RSpec::Mocks.proxy_for(Salmon::EncryptedSlap).reset
|
||||
allow(@salmon).to receive(:xml_for).and_call_original
|
||||
|
||||
Typhoeus.stub(person.receive_url).and_return @response
|
||||
Typhoeus.stub(@people[1].receive_url).and_return @response
|
||||
|
|
|
|||
Loading…
Reference in a new issue