Jan 30
Help! Rails test cases do not remove fixture data
Check if target database table is of MyIsam type. You have two options, first is not to use transactional fixtures in tests:
self.use_transactional_fixtures = falseSecond and better option is to convert all tables to InnoDB tables. This migration can help converting:
class MyIsam2InnoDb < ActiveRecord::Migration
def self.up
ActiveRecord::Base.connection.tables.each {|t|
execute "ALTER TABLE #{t} TYPE=InnoDB"}
end
def self.down
end
end
I am Bojan Mihelac and this blog is dedicated to share code, thoughts, tools and advices I came up with while working at
blog comments powered by Disqus