Permalink
Browse files

Bundle for railties tests too

  • Loading branch information...
jeremy committed Oct 20, 2009
1 parent 2767036 commit 4f6d8ceb0436cf7eea435bdfed87ecf5aba050c1
Showing with 30 additions and 22 deletions.
  1. +1 −1 ci/ci_build.rb
  2. +9 −9 railties/test/abstract_unit.rb
  3. +20 −12 railties/test/isolation/abstract_unit.rb
View
@@ -80,7 +80,7 @@
puts
puts "[CruiseControl] Building RailTies"
puts
- build_results[:railties] = system 'rake'
+ build_results[:railties] = system 'gem bundle && rake'
end
@@ -1,14 +1,14 @@
ORIG_ARGV = ARGV.dup
-require 'rubygems'
-gem 'rack', '~> 1.0.0'
-gem 'rack-test', '~> 0.5.0'
+bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment"
+if File.exist?("#{bundled}.rb")
+ require bundled
+else
+ %w(activesupport activemodel activerecord actionpack actionmailer activeresource).each do |lib|
+ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../#{lib}/lib"
+ end
+end
-$:.unshift File.dirname(__FILE__) + "/../../activesupport/lib"
-$:.unshift File.dirname(__FILE__) + "/../../activerecord/lib"
-$:.unshift File.dirname(__FILE__) + "/../../actionpack/lib"
-$:.unshift File.dirname(__FILE__) + "/../../actionmailer/lib"
-$:.unshift File.dirname(__FILE__) + "/../../activeresource/lib"
$:.unshift File.dirname(__FILE__) + "/../lib"
$:.unshift File.dirname(__FILE__) + "/../builtin/rails_info"
@@ -25,4 +25,4 @@
Rails::Initializer.run do |config|
config.root = File.dirname(__FILE__)
-end
+end
@@ -114,18 +114,26 @@ def controller(name, contents)
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

0 comments on commit 4f6d8ce

Please sign in to comment.