Browser::Actions specs fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user