aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/Rakefile
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-22 11:13:34 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-22 15:32:35 -0700
commit98f856d7723bd8aa8ccc05dfb7219c897b4dcab7 (patch)
treed55a9a8b5ac2dbf8192768ec7ca835cacbcffd8a /actionpack/Rakefile
parent3c13551aa2c7f43f7863349ef5699d42dd255801 (diff)
downloadrails-98f856d7723bd8aa8ccc05dfb7219c897b4dcab7.tar.gz
rails-98f856d7723bd8aa8ccc05dfb7219c897b4dcab7.tar.bz2
rails-98f856d7723bd8aa8ccc05dfb7219c897b4dcab7.zip
Set ENV['NEW'] to run any test task with the new Base.
Diffstat (limited to 'actionpack/Rakefile')
-rw-r--r--actionpack/Rakefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/Rakefile b/actionpack/Rakefile
index 6c820636d5..79a582033a 100644
--- a/actionpack/Rakefile
+++ b/actionpack/Rakefile
@@ -24,8 +24,9 @@ task :default => [ :test ]
desc "Run all unit tests"
task :test => [:test_action_pack, :test_active_record_integration, :test_new_base, :test_new_base_on_old_tests]
+test_lib_dir = ENV["NEW"] ? "test/new_base" : "test"
Rake::TestTask.new(:test_action_pack) do |t|
- t.libs << "test"
+ t.libs << test_lib_dir
# make sure we include the tests in alphabetical order as on some systems
# this will not happen automatically and the tests (as a whole) will error
@@ -37,27 +38,27 @@ end
task :isolated_test do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("test/{controller,dispatch,template}/**/*_test.rb").all? do |file|
- system(ruby, '-Ilib:test', file)
+ system(ruby, "-Ilib:#{test_lib_dir}", file)
end or raise "Failures"
end
desc 'ActiveRecord Integration Tests'
Rake::TestTask.new(:test_active_record_integration) do |t|
- t.libs << "test"
+ t.libs << test_lib_dir
t.test_files = Dir.glob("test/activerecord/*_test.rb")
t.verbose = true
end
desc 'New Controller Tests'
Rake::TestTask.new(:test_new_base) do |t|
- t.libs << "test"
+ t.libs << "test/new_base"
t.test_files = Dir.glob("test/{abstract_controller,new_base}/*_test.rb")
t.verbose = true
end
desc 'Old Controller Tests on New Base'
Rake::TestTask.new(:test_new_base_on_old_tests) do |t|
- t.libs << "test/new_base" << "test"
+ t.libs << "test/new_base"
# layout
# Dir.glob( "test/{dispatch,template}/**/*_test.rb" ).sort +
t.test_files = %w(
@@ -71,7 +72,6 @@ Rake::TestTask.new(:test_new_base_on_old_tests) do |t|
).map { |name| "test/controller/#{name}_test.rb" }
end
-
# Genereate the RDoc documentation
Rake::RDocTask.new { |rdoc|