Pre-loaded fixtures wiped-out by test run

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Pre-loaded fixtures wiped-out by test run

Alex Dilley
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.

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit