It does not give a direct answer to the question, but can be very useful.
You can use the pry-rescue
gem to have your tests start a pry session whenever something goes wrong. All you have to do is add a gem to your gemfile:
group :development, :test do gem 'pry-rescue' end
Then run your tests with the following flag:
PRY_RESCUE_RAILS=1 rails test rails test test/integration/agendas_test.rb
source share