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 Aug 14, 2021
1 parent fe497cc commit d8d985d
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 @@ -534,9 +534,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 d8d985d

Please sign in to comment.