Merge pull request #52130 from rails/fxn/trx-transaction-guide
Document test transactions w/ multiple databases
This commit is contained in:
commit
23729cec4e
@ -429,6 +429,12 @@ class MyTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If there are [multiple writing databases](active_record_multiple_databases.html)
|
||||||
|
in place, tests are wrapped in as many respective transactions, and all of them
|
||||||
|
are rolled back.
|
||||||
|
|
||||||
|
#### Opting-out of Test Transactions
|
||||||
|
|
||||||
Individual test cases can opt-out:
|
Individual test cases can opt-out:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
Loading…
Reference in New Issue
Block a user