Skip to content

Commit 25f5dfe

Browse files
cguntherAlexander-Senko
authored andcommitted
Enable transactional fixtures in dummy app's specs
This wraps each example in a transaction that's rolled back at the end of the example to avoid records leaking from one test to the next. Without this, if you repeatedly run tests, your database will repeatedly grow, and depending on your assertions, may fail due to data from previous test runs. CI wouldn't have surfaced this issue as it creates a new DB for each run.
1 parent 4d34320 commit 25f5dfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/dummy/spec/rails_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# If you're not using ActiveRecord, or you'd prefer not to run each of your
4040
# examples within a transaction, remove the following line or assign false
4141
# instead of true.
42-
# config.use_transactional_fixtures = true
42+
config.use_transactional_fixtures = true
4343

4444
# You can uncomment this line to turn off ActiveRecord support entirely.
4545
# config.use_active_record = false

0 commit comments

Comments
 (0)