[rspec-users] db:test:clone_structure doesn't purge db
justnothing at tiscali.co.uk
Mon Jun 25 08:56:49 EDT 2007
I'm using a "CHARSET=utf8" option in my migrations, but this isn't dumped to
schema.rb - a file that test:db:clone uses to create the test database. The
end result is some of my specs fail because they're expecting the db table
to be using utf8.
to get round this, I switched to using db:test:clone_structure which DOES
preserve the charset option, but when the test db is created using this
method, the db isn't emptied between specs. e.g. If my before method creates
an object, and the spec has 8 examples, by the time the last example is run
there are 7 objects in the database. This isn't the case when I use
this doesn't happen when using Test::Unit so I think it may be an rspec
issue but I can't figure out why. any suggestions?
View this message in context: http://www.nabble.com/db%3Atest%3Aclone_structure-doesn%27t-purge-db-tf3975989.html#a11286138
Sent from the rspec-users mailing list archive at Nabble.com.
More information about the rspec-users