diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-19 19:22:23 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-19 19:22:23 -0700 |
commit | 4f6d8ceb0436cf7eea435bdfed87ecf5aba050c1 (patch) | |
tree | ad790f4fc233921f28d0cc914572c89affb2c2c0 /railties/test/isolation | |
parent | 27670363926ee341078aa69ae27204d7338037f5 (diff) | |
download | rails-4f6d8ceb0436cf7eea435bdfed87ecf5aba050c1.tar.gz rails-4f6d8ceb0436cf7eea435bdfed87ecf5aba050c1.tar.bz2 rails-4f6d8ceb0436cf7eea435bdfed87ecf5aba050c1.zip |
Bundle for railties tests too
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index aafc9f68bb..557292e7d3 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -114,18 +114,26 @@ module TestHelpers end def boot_rails - %w( - actionmailer/lib - actionpack/lib - activemodel/lib - activerecord/lib - activeresource/lib - activesupport/lib - railties/lib - railties - ).reverse_each do |path| - path = File.expand_path("../../../../#{path}", __FILE__) - $:.unshift(path) + bundled = "#{File.dirname(__FILE__)}/../../vendor/gems/environment" + if File.exist?("#{bundled}.rb") + require bundled + %w(railties railties/lib).each do |path| + $LOAD_PATH.unshift File.expand_path("../../../../#{path}", __FILE__) + end + else + %w( + actionmailer/lib + actionpack/lib + activemodel/lib + activerecord/lib + activeresource/lib + activesupport/lib + railties/lib + railties + ).reverse_each do |path| + path = File.expand_path("../../../../#{path}", __FILE__) + $:.unshift(path) + end end end end |