1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/helpers/test_helper.rb
David Heinemeier Hansson 07afb1fd42 Made it even easier to turn on transactional fixtures
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 09:27:55 +00:00

26 lines
No EOL
899 B
Ruby

ENV["RAILS_ENV"] = "test"
# Expand the path to environment so that Ruby does not load it multiple times
# File.expand_path can be removed if Ruby 1.9 is in use.
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'application'
require 'test/unit'
require 'active_record/fixtures'
require 'action_controller/test_process'
require 'action_web_service/test_invoke'
require 'breakpoint'
Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
class Test::Unit::TestCase
# Turn these on to use transactional fixtures with table_name(:fixture_name) instantiation of fixtures
# self.use_transactional_fixtures = true
# self.use_instantiated_fixtures = false
def create_fixtures(*table_names)
Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures", table_names)
end
# Add more helper methods to be used by all tests here...
end