Skip to content

Commit 23729ce

Browse files
authored
Merge pull request rails#52130 from rails/fxn/trx-transaction-guide
Document test transactions w/ multiple databases
2 parents 3342f13 + ec056dd commit 23729ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

guides/source/testing.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,12 @@ class MyTest < ActiveSupport::TestCase
429429
end
430430
```
431431

432+
If there are [multiple writing databases](active_record_multiple_databases.html)
433+
in place, tests are wrapped in as many respective transactions, and all of them
434+
are rolled back.
435+
436+
#### Opting-out of Test Transactions
437+
432438
Individual test cases can opt-out:
433439

434440
```ruby

0 commit comments

Comments
 (0)