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

Commit 3bae67d

Browse files
odinhbpirj
authored andcommitted
Deprecate currently_executing_a_context_hook?
1 parent 13e97f5 commit 3bae67d

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
@@ -544,9 +544,15 @@ def self.store_before_context_ivars(example_group_instance)
544544
end
545545
end
546546

547+
# @deprecated use `RSpec.current_scope` instead
547548
# Returns true if a `before(:context)` or `after(:context)`
548549
# hook is currently executing.
549550
def self.currently_executing_a_context_hook?
551+
RSpec.deprecate(
552+
"currently_executing_a_context_hook",
553+
:replacement => "RSpec.current_scope"
554+
)
555+
550556
@currently_executing_a_context_hook
551557
end
552558

0 commit comments

Comments
 (0)