Phlip
9/15/2007 4:25:00 PM
Travis D Warlick Jr wrote:
> One possible rails issue: I believe the entire test database structure is
> erased
> and recreated everytime, so it couldn't be a rake task, it would have to
> be
> integrated into the test task.
Yup; I just got that.
Then I put the conversion into the top of the source file of the first test
suite in alphabetic order (please nobody comment on the sustainability!),
and got a huge spew of test faults, as if I had no fixtures. The converter
was just this:
require File.dirname(__FILE__) + '/../test_helper'
def setup_database
tables = %w( accessories chats fighter_images props rings rounds users )
tables.each do |table|
ActiveRecord::Base.connection.execute("
ALTER TABLE #{ table } ENGINE=HEAP
")
end
end
setup_database
class AccessoryTest < Test::Unit::TestCase
...
And note, per the memory consumption issues you mentioned, that you don't
need to put all the fixtures in the list - if it worked!
--
Phlip