Skip to content
This repository
Browse code

open a pry session within the example block on failure

  • Loading branch information...
commit 90ae3c5fdab3d635e2ee0ef7c763d22011ff867a 1 parent 0ac4e6e
David Chelimsky dchelimsky authored

Showing 2 changed files with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  Gemfile
  2. +1 0  lib/rspec/core/example.rb
1  Gemfile
@@ -21,6 +21,7 @@ gem "guard-rspec", "0.1.9"
21 21 gem "growl", "1.0.3"
22 22 gem "ZenTest", "~> 4.4.2"
23 23 gem "nokogiri", "1.4.4"
  24 +gem "pry", "0.8.2"
24 25
25 26 platforms :mri_18 do
26 27 gem 'ruby-debug'
1  lib/rspec/core/example.rb
@@ -49,6 +49,7 @@ def run(example_group_instance, reporter)
49 49 rescue Pending::PendingDeclaredInExample => e
50 50 @pending_declared_in_example = e.message
51 51 rescue Exception => e
  52 + @example_group_instance.instance_eval { pry } if defined?(Pry)
52 53 set_exception(e)
53 54 ensure
54 55 run_after_each

0 comments on commit 90ae3c5

Please sign in to comment.
Something went wrong with that request. Please try again.