aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-15 03:02:28 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-15 03:02:28 +0000
commite3bb9e7a9cc2ba1fd48cc3f4627a9a7493eaee49 (patch)
tree755aeb13085884decb307e351e9f818e85dd31dc
parent08917a6c5e56430e3f2e5e89c5524b78d88a235b (diff)
downloadrails-e3bb9e7a9cc2ba1fd48cc3f4627a9a7493eaee49.tar.gz
rails-e3bb9e7a9cc2ba1fd48cc3f4627a9a7493eaee49.tar.bz2
rails-e3bb9e7a9cc2ba1fd48cc3f4627a9a7493eaee49.zip
Cleaned up test_helper
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/helpers/test_helper.rb21
-rw-r--r--railties/lib/test_help.rb15
2 files changed, 16 insertions, 20 deletions
diff --git a/railties/helpers/test_helper.rb b/railties/helpers/test_helper.rb
index 72a8ca086b..15961ba258 100644
--- a/railties/helpers/test_helper.rb
+++ b/railties/helpers/test_helper.rb
@@ -1,26 +1,7 @@
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/"
+require 'test_help'
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 \ No newline at end of file
diff --git a/railties/lib/test_help.rb b/railties/lib/test_help.rb
new file mode 100644
index 0000000000..bd2234365b
--- /dev/null
+++ b/railties/lib/test_help.rb
@@ -0,0 +1,15 @@
+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 = RAILS_ROOT + "/fixtures/"
+
+class Test::Unit::TestCase
+ def create_fixtures(*table_names)
+ Fixtures.create_fixtures(RAILS_ROOT + "/fixtures", table_names)
+ end
+end \ No newline at end of file