Skip to content

Commit

Permalink
Deprecate currently_executing_a_context_hook?
Browse files Browse the repository at this point in the history
  • Loading branch information
odinhb authored and pirj committed Jul 16, 2021
1 parent beca9ba commit 91b7c0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rspec/core/example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,15 @@ def self.store_before_context_ivars(example_group_instance)
end
end

# @deprecated use `RSpec.current_scope` instead
# Returns true if a `before(:context)` or `after(:context)`
# hook is currently executing.
def self.currently_executing_a_context_hook?
RSpec.deprecate(
"currently_executing_a_context_hook",
:replacement => "RSpec.current_scope"
)

@currently_executing_a_context_hook
end

Expand Down

0 comments on commit 91b7c0e

Please sign in to comment.