Skip to content
This repository
Browse code

Cleaned up test_helper

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit e3bb9e7a9cc2ba1fd48cc3f4627a9a7493eaee49 1 parent 08917a6
David Heinemeier Hansson dhh authored

Showing 2 changed files with 16 additions and 20 deletions. Show diff stats Hide diff stats

  1. +1 20 railties/helpers/test_helper.rb
  2. +15 0 railties/lib/test_help.rb
21 railties/helpers/test_helper.rb
... ... @@ -1,26 +1,7 @@
1 1 ENV["RAILS_ENV"] = "test"
2   -
3   -# Expand the path to environment so that Ruby does not load it multiple times
4   -# File.expand_path can be removed if Ruby 1.9 is in use.
5 2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
6   -require 'application'
7   -
8   -require 'test/unit'
9   -require 'active_record/fixtures'
10   -require 'action_controller/test_process'
11   -require 'action_web_service/test_invoke'
12   -require 'breakpoint'
13   -
14   -Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
  3 +require 'test_help'
15 4
16 5 class Test::Unit::TestCase
17   - # Turn these on to use transactional fixtures with table_name(:fixture_name) instantiation of fixtures
18   - # self.use_transactional_fixtures = true
19   - # self.use_instantiated_fixtures = false
20   -
21   - def create_fixtures(*table_names)
22   - Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures", table_names)
23   - end
24   -
25 6 # Add more helper methods to be used by all tests here...
26 7 end
15 railties/lib/test_help.rb
... ... @@ -0,0 +1,15 @@
  1 +require 'application'
  2 +
  3 +require 'test/unit'
  4 +require 'active_record/fixtures'
  5 +require 'action_controller/test_process'
  6 +require 'action_web_service/test_invoke'
  7 +require 'breakpoint'
  8 +
  9 +Test::Unit::TestCase.fixture_path = RAILS_ROOT + "/fixtures/"
  10 +
  11 +class Test::Unit::TestCase
  12 + def create_fixtures(*table_names)
  13 + Fixtures.create_fixtures(RAILS_ROOT + "/fixtures", table_names)
  14 + end
  15 +end

0 comments on commit e3bb9e7

Please sign in to comment.
Something went wrong with that request. Please try again.