Skip to content

Instantly share code, notes, and snippets.

@garrow
Created February 27, 2012 09:01
Show Gist options
  • Save garrow/1922633 to your computer and use it in GitHub Desktop.
Save garrow/1922633 to your computer and use it in GitHub Desktop.
make capybara specs open save the page on failing specs
RSpec.configure do |config|
# ...
# Open output of failing specs.
config.after(:each) do
if example.exception and example.metadata[:type] == :request
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