Skip to content

Instantly share code, notes, and snippets.

@jumski
Created April 20, 2012 16:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jumski/2430122 to your computer and use it in GitHub Desktop.
Save jumski/2430122 to your computer and use it in GitHub Desktop.
rspec around hook for runnign selenium_chrome with headless gem in capybara
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