Browser::Actions specs fixes

This commit is contained in:
erwanlr
2013-04-09 18:27:36 +02:00
parent 3525fb87e2
commit 47fb8b9938
5 changed files with 10 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ shared_examples 'WpItem::Existable' do
let(:response) { Typhoeus::Response.new }
it 'does not create a request' do
Browser.instance.should_not_receive(:get)
Browser.should_not_receive(:get)
subject.stub(:exists_from_response?).and_return(true)
subject.exists?({}, response).should be_true
@@ -16,7 +16,7 @@ shared_examples 'WpItem::Existable' do
context 'when the response is not supplied' do
it 'creates a request' do
Browser.instance.should_receive(:get)
Browser.should_receive(:get)
subject.stub(:exists_from_response?).and_return(false)
subject.exists?.should be_false

View File

@@ -27,7 +27,7 @@ shared_examples 'WpTarget::WpRegistrable' do
describe '#registration_enabled?' do
after do
wp_target.stub(:multisite?).and_return(multisite)
stub_request(:get, wp_target.registration_url.to_s).to_return(@stub)
stub_request(:get, wp_target.registration_url).to_return(@stub)
wp_target.registration_enabled?.should === @expected
end