Pre-loaded fixtures wiped-out by test run

If you preload your test database with all fixture data via the rake task:

bin/rails db:fixtures:load


And set self.pre_loaded_fixtures to true:

class ActiveSupport::TestCase

self.pre_loaded_fixtures = true

self.use_transactional_tests = true # the default

fixtures :all



Would you expect the fixtures to be deleted and reinserted on every test run (caused by ActiveRecord::FixtureSet.create_fixtures ā€“ the same code exercised by the rake task)? Given the documentation on Transactional Tests, Iā€™d imagine this to be unexpected behaviour but, regardless of options configured, fixture data is always reinstalled by the fixtures :all call.