mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #44956 from sato11/document-uses_transaction
Document `uses_transaction` [ci-skip]
This commit is contained in:
commit
74cd04d6ea
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ module ActiveRecord
|
|||
end
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue