Skip to content

Refactor: store current_example in a local.

gitlab-qa-bot requested to merge refactor_pending into master

Created by: myronmarston

  • There's no need to call RSpec.current_example many times in this method.
  • This wasn't working correctly for specs that create an example group and run it (from within the spec itself), as that caused RSpec.current_example to get cleared when the locally created example group completed, even though the spec that created the example group had not yet completed. For an example of this, see this rspec-its PR:

https://github.com/rspec/rspec-its/pull/1#discussion_r6677739

Merge request reports