Hey guys. I am trying to get transactional specs working with
autotest and it's just not happening. My current setup looks like
this.
config.before(:suite) do
DatabaseCleaner.strategy = :deletion
DatabaseCleaner.clean_with(:deletion)
#DatabaseCleaner.strategy = :truncation
#DatabaseCleaner.clean_with(:truncation)
end
config.before(:all) do
DatabaseCleaner.start
end
config.after(:all) do
DatabaseCleaner.clean
This works fine but I would like to speed up my tests and use
transactions instead. So I followed the instructions here
http://blog.pardner.com/2013/01/getting-rspec-postgres-databasecleaner-to-play-nicely-together/
Those instructions do not work. My tests fail due to various things
like duplicate primary keys and such so clearly the transactions are
not happening properly. If I turn on transactional tests I get errors
about transactions already in progress and the tests fail.
In the current set up I am also getting insane amount of log entries
during the database clean and am wondering if there is a way to turn
that off somehow without also turning off all the SQL statements.