aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/initializer/test_helper.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-09-21 21:14:04 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-09-21 21:14:04 +0100
commit340be9bddd8e5902e0218a0101a40a17a4afd558 (patch)
treeef4de25f3f8eb610dc2235f0762b01cb1d464efd /railties/test/initializer/test_helper.rb
parentb31cdb55422226cd45a2234a4b54986f1f611151 (diff)
parent1bbb9b2db05730194edfd7d2cef9f5fcb9d79e50 (diff)
downloadrails-340be9bddd8e5902e0218a0101a40a17a4afd558.tar.gz
rails-340be9bddd8e5902e0218a0101a40a17a4afd558.tar.bz2
rails-340be9bddd8e5902e0218a0101a40a17a4afd558.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'railties/test/initializer/test_helper.rb')
-rw-r--r--railties/test/initializer/test_helper.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/railties/test/initializer/test_helper.rb b/railties/test/initializer/test_helper.rb
index 9d7dfff1c0..f6a2547efc 100644
--- a/railties/test/initializer/test_helper.rb
+++ b/railties/test/initializer/test_helper.rb
@@ -2,13 +2,16 @@
# boot from scratch in vendored mode. This file should really only be
# required in test cases that use the isolation helper so that requires
# can be reset correctly.
-RAILS_ROOT = File.join(File.dirname(__FILE__), "root")
-RAILS_FRAMEWORK_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..'))
+RAILS_ROOT = "#{File.dirname(__FILE__)}/root"
+RAILS_FRAMEWORK_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../..")
+
+require 'rubygems'
+gem 'rack', '~> 1.0.0'
require "test/unit"
# We are purposely avoiding adding things to the load path to catch bugs that only happen in the genuine article
-require File.join(RAILS_FRAMEWORK_ROOT, 'activesupport', 'lib', 'active_support', 'testing', 'isolation')
-require File.join(RAILS_FRAMEWORK_ROOT, 'activesupport', 'lib', 'active_support', 'testing', 'declarative')
+require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/isolation"
+require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/declarative"
class Test::Unit::TestCase
extend ActiveSupport::Testing::Declarative
@@ -35,7 +38,7 @@ module Rails
def boot!
# Require the initializer
- require File.join(RAILS_FRAMEWORK_ROOT, 'railties', 'lib', 'initializer')
+ require "#{RAILS_FRAMEWORK_ROOT}/railties/lib/initializer"
# Run the initializer the same way boot.rb does it
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
@@ -45,4 +48,4 @@ module Rails
end
# All that for this:
-Rails.boot! \ No newline at end of file
+Rails.boot!