Skip to content

Instantly share code, notes, and snippets.

@ConradIrwin
Created September 4, 2012 23:48
Show Gist options
  • Save ConradIrwin/8a9ea68a9988bde2b622 to your computer and use it in GitHub Desktop.
Save ConradIrwin/8a9ea68a9988bde2b622 to your computer and use it in GitHub Desktop.
require 'pry'
RSpec.configure do |c|
c.around(:each) do |example|
Pry::rescue do
example.binding.eval('@exception = nil')
example.run
if e = example.binding.eval('@exception')
Pry::rescued(e)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment