So I am in my test environment
now, in the terminial, rake db:test:prepare clears the db... but not when i run it from the code
And I have this in features/support/env.rb:
Before do
task :build_all do
[ :debug, :release ].each do |t|
$build_type = t
Rake::Task["db:test:prepare"].reenable
Rake::Task["db:test:prepare"].invoke
end
end
end
But my data remains in the project_test db when my tests are done running
This is in my database.yml
test:
adapter: mysql
encoding: utf8
database: projectname_test
username: root
password:
Ive also tried
db:test:purge
and
db:test:reset
and I know that it is using my test db, because I check mySQLWorkbench, and it inserts data into the tables... but doesn't delete the data when its done (I have to delete it manually). When the tables are empty, the test cases pass