Subbing out the return value rather then the setting.

This commit is contained in:
Dylan Lacey 2013-02-26 17:09:57 -08:00
parent 24a9cf4a86
commit 64727f8be1
3 changed files with 5 additions and 8 deletions

1
.rspec
View File

@ -1 +0,0 @@
--format NyanCatFormatter

View File

@ -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

View File

@ -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)