Reset Capybara.app_host after each spec
Workaround for Capybara integration specs which fail to do the same.
This commit is contained in:
parent
8650fe1ff3
commit
615698037e
|
@ -17,10 +17,6 @@ $:.detect do |dir|
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.filter_run_excluding :skip_on_windows => !(RbConfig::CONFIG['host_os'] =~ /mingw32/).nil?
|
||||
end
|
||||
|
||||
require 'capybara/webkit'
|
||||
connection = Capybara::Webkit::Connection.new(:socket_class => TCPSocket)
|
||||
$webkit_browser = Capybara::Webkit::Browser.new(connection)
|
||||
|
@ -35,6 +31,11 @@ Capybara.register_driver :reusable_webkit do |app|
|
|||
Capybara::Webkit::Driver.new(app, :browser => $webkit_browser)
|
||||
end
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.filter_run_excluding :skip_on_windows => !(RbConfig::CONFIG['host_os'] =~ /mingw32/).nil?
|
||||
c.before { Capybara.app_host = nil }
|
||||
end
|
||||
|
||||
def with_env_vars(vars)
|
||||
old_env_variables = {}
|
||||
vars.each do |key, value|
|
||||
|
|
Loading…
Reference in New Issue