Permalink
Browse files

Don't reset the browser unnecessarily

The Capybara spec_helper already resets the browser after each spec, so
we only need to reset after using the driver via AppRunner.
  • Loading branch information...
1 parent c3eb16b commit 8650fe1ff3dd24bf121a5a233e03b59d2b7a2af4 @mhoran mhoran committed Nov 29, 2012
Showing with 1 addition and 4 deletions.
  1. +0 −4 spec/spec_helper.rb
  2. +1 −0 spec/support/app_runner.rb
View
@@ -29,10 +29,6 @@
$webkit_browser.enable_logging
end
-RSpec.configure do |config|
- config.before { $webkit_browser.reset! }
-end
-
require File.join(spec_dir, "spec_helper")
Capybara.register_driver :reusable_webkit do |app|
@@ -51,6 +51,7 @@ def build_driver
def self.included(example_group)
example_group.class_eval do
before { AppRunner.reset }
+ after { $webkit_browser.reset! }
end
end
end

0 comments on commit 8650fe1

Please sign in to comment.