RailsCasts Pro episodes are now free!

Learn more or hide this

Matthew McEachen's Profile

GitHub User: mceachen

Site: http://matthew.mceachen.us/

Comments by Matthew McEachen

Avatar

This works for transactions (tons faster than :truncation):

ruby
DatabaseCleaner.strategy = :transaction
class MiniTest::Spec
  before :each do
    DatabaseCleaner.start
  end
  after :each do
    DatabaseCleaner.clean
  end
end