Skip to content

Commit 6489ae6

Browse files
committed
Use the new RSpec.current_scope method
It was introduced in rspec/rspec-core#2895
1 parent e68175d commit 6489ae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/rails/fixture_support.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def fixtures(*args)
4646
def proxy_method_warning_if_called_in_before_context_scope(method_name)
4747
orig_implementation = instance_method(method_name)
4848
define_method(method_name) do |*args, &blk|
49-
if inspect.include?("before(:context)")
49+
if RSpec.current_scope == :before_context_hook
5050
RSpec.warn_with("Calling fixture method in before :context ")
5151
else
5252
orig_implementation.bind(self).call(*args, &blk)

0 commit comments

Comments
 (0)