Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/tags/rel_1-2-1/railties/lib/test_help.rb

Revision 5639, 0.6 kB (checked in by nzkoz, 2 years ago)

Ensure integration tests get the correct value of fixtures_path. Closes #6672

Line 
1 require_dependency 'application'
2
3 # Make double-sure the RAILS_ENV is set to test,
4 # so fixtures are loaded to the right database
5 silence_warnings { RAILS_ENV = "test" }
6
7 require 'test/unit'
8 require 'active_record/fixtures'
9 require 'action_controller/test_process'
10 require 'action_controller/integration'
11 require 'action_web_service/test_invoke'
12 require 'breakpoint'
13
14 Test::Unit::TestCase.fixture_path = RAILS_ROOT + "/test/fixtures/"
15 ActionController::IntegrationTest.fixture_path = Test::Unit::TestCase.fixture_path
16
17 def create_fixtures(*table_names)
18   Fixtures.create_fixtures(RAILS_ROOT + "/test/fixtures", table_names)
19 end
Note: See TracBrowser for help on using the browser.