Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Fix tests to account for #driver.session_id existing
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanLacey committed Jan 20, 2016
1 parent 63d92df commit 2252b92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/cucumber_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def run_defined_feature(content)

def step_mother
@step_mother ||= ::Cucumber::Runtime.new
return @step_mother
end

def load_features(content)
Expand Down
4 changes: 3 additions & 1 deletion spec/sauce/cucumber_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module Sauce::Capybara
let(:driver) do
driver = double('Sauce::Selenium2 Driver')
driver.stub(:finish!)
driver.stub(:session_id).and_return(session_id)
driver.stub_chain(:browser, :quit)
driver.stub_chain(:browser, :session_id).and_return(session_id)
driver
Expand All @@ -71,7 +72,8 @@ module Sauce::Capybara
# Need to create our nice mocked Capybara driver
Capybara.stub_chain(:current_session, :driver).and_return(driver)
SauceWhisk::Job.stub(:new).and_return(nil)
Sauce::Selenium2.stub(:new).with(anything).and_return Object.new
Sauce::Selenium2.stub(:new).with(anything).and_return driver

Sauce.config do |c|
c[:browsers] = [
["OS X 10.8", "Safari", "6"],
Expand Down

0 comments on commit 2252b92

Please sign in to comment.