From ee760f2611e5c8f44494381ebe8546cceb09fcde Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Thu, 18 Feb 2021 21:52:40 +0100 Subject: [PATCH] @example resolve to nil, self: RSpec::ExampleGroups::ObservesACallToName --- lib/rspec/rails/fixture_support.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/rails/fixture_support.rb b/lib/rspec/rails/fixture_support.rb index 1a7221e829..12acfdfbd6 100644 --- a/lib/rspec/rails/fixture_support.rb +++ b/lib/rspec/rails/fixture_support.rb @@ -13,7 +13,7 @@ module FixtureSupport # Monkey patched to avoid collisions with 'let(:name)' in Rails 6.1 and after # and let(:method_name) before Rails 6.1. def run_in_transaction? - use_transactional_tests && !self.class.uses_transaction?(@example) + use_transactional_tests && !self.class.uses_transaction?(self) end included do