Forked from jumski/spec_helper_with_headless_chrome.rb
Created
September 17, 2012 08:53
-
-
Save iRonin/3736260 to your computer and use it in GitHub Desktop.
rspec around hook for runnign selenium_chrome with headless gem in capybara
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c.around(:each, :js => true) do |example| | |
if Capybara.current_driver == :chrome | |
headless = Headless.new | |
headless.start | |
end | |
example.run | |
headless.destroy if Capybara.current_driver == :chrome | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment