Skip to content

Instantly share code, notes, and snippets.

@fletcherm
Created December 26, 2012 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fletcherm/4382359 to your computer and use it in GitHub Desktop.
Save fletcherm/4382359 to your computer and use it in GitHub Desktop.
capybara-screenshot and RSpec configuration
scenario 'closing the map and looking at it later', screenshot: true do
# ...
end
RSpec.configure do |c|
c.before(:each, type: :feature) do
Capybara::Screenshot.autosave_on_failure = example.metadata[:screenshot]
end
end
Capybara::Screenshot.autosave_on_failure = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment