Subbing out the return value rather then the setting.
This commit is contained in:
parent
24a9cf4a86
commit
64727f8be1
|
@ -39,10 +39,6 @@ describe Sauce::Capybara do
|
|||
|
||||
describe Sauce::Capybara::Driver do
|
||||
|
||||
before :all do
|
||||
rspec_reset
|
||||
end
|
||||
|
||||
let(:app) { double('Mock App for Driver') }
|
||||
let(:driver) { Sauce::Capybara::Driver.new(app) }
|
||||
|
||||
|
@ -75,9 +71,7 @@ describe Sauce::Capybara do
|
|||
context 'when tunneling is disabled' do
|
||||
it 'should not call #connect_tunnel' do
|
||||
Sauce::Capybara.should_receive(:connect_tunnel).never
|
||||
Sauce.config do |c|
|
||||
c[:start_tunnel] = false
|
||||
end
|
||||
Sauce.stub(:get_config) {{:start_tunnel => false}}
|
||||
|
||||
driver.browser
|
||||
end
|
||||
|
|
|
@ -231,6 +231,10 @@ describe Sauce do
|
|||
Sauce.instance_variable_set(:@cfg, nil)
|
||||
end
|
||||
|
||||
after :all do
|
||||
|
||||
end
|
||||
|
||||
it 'should return a newly created Sauce::Config' do
|
||||
dummy_config = double('Sauce::Config')
|
||||
Sauce::Config.should_receive(:new).and_return(dummy_config)
|
||||
|
|
Loading…
Reference in New Issue