File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ def register(object, thread)
3030 @records << OpenStruct . new (
3131 thread : thread ,
3232 object : object ,
33- example : $current_example,
33+ # When rake spec:prepare is run, the current_example method is not defined
34+ example : RSpec . respond_to? ( :current_example ) ? RSpec . current_example : nil ,
3435 )
3536 end
3637 end
@@ -46,7 +47,7 @@ def verify_empty!
4647 msg << "\n with options: #{ record . object . options } "
4748 end
4849 if record . example
49- msg << "\n in #{ record . example . id } #{ record . example . full_description } "
50+ msg << "\n in #{ record . example . id } : #{ record . example . full_description } "
5051 else
5152 msg << "\n not in an example"
5253 end
@@ -57,14 +58,3 @@ def verify_empty!
5758 end
5859 end
5960end
60-
61- RSpec . configure do |config |
62- config . around do |example |
63- $current_example = example
64- begin
65- example . run
66- ensure
67- $current_example = nil
68- end
69- end
70- end
You can’t perform that action at this time.
0 commit comments