Permalink
Browse files

Reset Capybara.app_host after each spec

Workaround for Capybara integration specs which fail to do the same.
  • Loading branch information...
mhoran committed Dec 1, 2012
1 parent 8650fe1 commit 615698037e598e88363fdcef78b2db8a0fcd7b74
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/spec_helper.rb
View
@@ -17,10 +17,6 @@
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::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|

0 comments on commit 6156980

Please sign in to comment.