Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 54b9339

Browse files
odinhbpirj
authored andcommitted
Deprecate currently_executing_a_context_hook?
1 parent 247d0a7 commit 54b9339

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/rspec/core/example_group.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,15 @@ def self.store_before_context_ivars(example_group_instance)
537537
end
538538
end
539539

540+
# @deprecated use `RSpec.current_scope` instead
540541
# Returns true if a `before(:context)` or `after(:context)`
541542
# hook is currently executing.
542543
def self.currently_executing_a_context_hook?
544+
RSpec.deprecate(
545+
"currently_executing_a_context_hook",
546+
:replacement => "RSpec.current_scope"
547+
)
548+
543549
@currently_executing_a_context_hook
544550
end
545551

0 commit comments

Comments
 (0)