We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c100cf1 commit c4e2647Copy full SHA for c4e2647
lib/rspec/rails/fixture_support.rb
@@ -12,8 +12,14 @@ module FixtureSupport
12
# @private prevent ActiveSupport::TestFixtures to start a DB transaction.
13
# Monkey patched to avoid collisions with 'let(:name)' in Rails 6.1 and after
14
# and let(:method_name) before Rails 6.1.
15
- def run_in_transaction?
16
- use_transactional_tests && !self.class.uses_transaction?(self)
+ if ::Rails::VERSION::STRING > '5'
+ def run_in_transaction?
17
+ use_transactional_tests && !self.class.uses_transaction?(self)
18
+ end
19
+ else
20
21
+ use_transactional_fixtures && !self.class.uses_transaction?(self)
22
23
end
24
25
included do
0 commit comments