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

Commit d8d985d

Browse files
odinhbpirj
authored andcommitted
Deprecate currently_executing_a_context_hook?
1 parent fe497cc commit d8d985d

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
@@ -534,9 +534,15 @@ def self.store_before_context_ivars(example_group_instance)
534534
end
535535
end
536536

537+
# @deprecated use `RSpec.current_scope` instead
537538
# Returns true if a `before(:context)` or `after(:context)`
538539
# hook is currently executing.
539540
def self.currently_executing_a_context_hook?
541+
RSpec.deprecate(
542+
"currently_executing_a_context_hook",
543+
:replacement => "RSpec.current_scope"
544+
)
545+
540546
@currently_executing_a_context_hook
541547
end
542548

0 commit comments

Comments
 (0)