Skip to content

Instantly share code, notes, and snippets.

@eloyesp
Created January 31, 2017 20:21
Show Gist options
  • Save eloyesp/f22306cbc017820e9ba86448299dac2a to your computer and use it in GitHub Desktop.
Save eloyesp/f22306cbc017820e9ba86448299dac2a to your computer and use it in GitHub Desktop.
auto save and open page on failure
RSpec.configure do |config|
config.after(type: :feature) do |example|
if Capybara::CapybaraError === example.exception
save_and_open_page
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment