ENV['RAILS_ENV'] ||= 'development' require File.dirname(__FILE__) + '/../../../../config/environment.rb' # this sucks # Load the testing framework require 'test_help' silence_warnings { RAILS_ENV = ENV['RAILS_ENV'] } # Run the migrations ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate") # Setup the fixtures path Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/" $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path) class Test::Unit::TestCase #:nodoc: def create_fixtures(*table_names) if block_given? Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names) { yield } else Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names) end end self.use_transactional_fixtures = true self.use_instantiated_fixtures = false end