2004-12-13 18:47:27 -05:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
2005-02-17 14:28:13 -05:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
require 'active_record'
|
|
|
|
require 'active_record/fixtures'
|
2005-02-15 10:57:44 -05:00
|
|
|
require 'active_support/binding_of_caller'
|
|
|
|
require 'active_support/breakpoint'
|
2004-11-23 20:04:44 -05:00
|
|
|
require 'connection'
|
|
|
|
|
|
|
|
class Test::Unit::TestCase #:nodoc:
|
|
|
|
def create_fixtures(*table_names)
|
|
|
|
if block_given?
|
|
|
|
Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures/", table_names) { yield }
|
|
|
|
else
|
|
|
|
Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures/", table_names)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2005-01-10 18:09:51 -05:00
|
|
|
Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
|
2005-06-10 10:58:02 -04:00
|
|
|
Test::Unit::TestCase.use_instantiated_fixtures = false
|
|
|
|
Test::Unit::TestCase.use_transactional_fixtures = (ENV['AR_TX_FIXTURES'] == "yes")
|
2005-06-10 09:54:58 -04:00
|
|
|
|