144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# File 'lib/sauce/capybara.rb', line 144
def self.configure_capybara_for_rspec
begin
require "rspec/core"
::RSpec.configure do |config|
config.before :suite do
::Capybara.configure do |capy_config|
sauce_config = Sauce::Config.new
if capy_config.app_host.nil?
if sauce_config[:start_local_application]
host = sauce_config[:application_host] || "127.0.0.1"
port = sauce_config[:application_port]
capy_config.app_host = "http://#{host}:#{port}"
capy_config.run_server = false
end
end
end
end
end
rescue LoadError => e
end
end
|