Helper to show capybara feature fails in the browser
-
Add the following to your Gemfile
gem ‘capybara-fail_show’, git: ‘git://github.com/robban/capybara-fail_show.git’
-
In your spec_helper.rb add the row below (before RSpec.configure)
Capybara::FailShow.activate
-
Now your failing capybara tests will automatically open up in a browser window, making it easier to see what was wrong
If you have a spec where it does not make sence to show the browser, just set fail_show: false on your scenario Example: scenario “Test something on course”, fail_show: false do