diff --git a/activerecord/lib/active_record/test_fixtures.rb b/activerecord/lib/active_record/test_fixtures.rb index c88e4fc61051f..d631b05db6eae 100644 --- a/activerecord/lib/active_record/test_fixtures.rb +++ b/activerecord/lib/active_record/test_fixtures.rb @@ -86,6 +86,9 @@ def setup_fixture_accessors(fixture_set_names = nil) include methods end + # Prevents automatically wrapping each specified test in a transaction, + # to allow application logic transactions to be tested in a top-level + # (non-nested) context. def uses_transaction(*methods) @uses_transaction = [] unless defined?(@uses_transaction) @uses_transaction.concat methods.map(&:to_s)