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

Commit

Permalink
Merge pull request #209 from DylanLacey/master
Browse files Browse the repository at this point in the history
Don't stop Capybara from starting the app if asked
  • Loading branch information
Dylan Lacey committed Feb 20, 2014
2 parents 1c8c36a + 900bc3d commit 5574f66
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/sauce/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def self.configure_capybara
::Capybara.configure do |config|
config.server_port = Sauce::Config.get_application_port
begin
config.always_include_port = true
#config.always_include_port = true
rescue
# This option is only in Capybara 2+
end
Expand All @@ -130,10 +130,13 @@ def self.configure_capybara_for_rspec
::RSpec.configure do |config|
config.before :suite do
::Capybara.configure do |config|
host = Sauce::Config.new[:application_host] || "127.0.0.1"
port = Sauce::Config.new[:application_port]
config.app_host = "http://#{host}:#{port}"
config.run_server = false
sauce_config = Sauce::Config.new
if sauce_config[:start_local_application]
host = sauce_config[:application_host] || "127.0.0.1"
port = sauce_config[:application_port]
config.app_host = "http://#{host}:#{port}"
config.run_server = false
end
end
end
end
Expand Down

0 comments on commit 5574f66

Please sign in to comment.