aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-12-21 10:10:35 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2011-12-21 10:11:57 -0700
commit4f629ed4bbb8902e8905dee3069edb1cd7e693b6 (patch)
tree9917005aed49cf438d337a7994e5894ebf069892 /railties/lib
parent14c89e7285d4e7cd40a542fbc31d9345f60c3aa4 (diff)
downloadrails-4f629ed4bbb8902e8905dee3069edb1cd7e693b6.tar.gz
rails-4f629ed4bbb8902e8905dee3069edb1cd7e693b6.tar.bz2
rails-4f629ed4bbb8902e8905dee3069edb1cd7e693b6.zip
Restore `rake TEST=test/unit/foo_test.rb` support.
Add your own test tasks as dependencies on the `test:run` task instead of `test` itself. namespace :test do task run: 'test:acceptance' Rails::SubTestTask.new acceptance: 'test:prepare' do |t| t.libs << 'test' t.pattern = 'test/acceptance/**/*_test.rb' end end
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/test_unit/testing.rake6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake
index cf86cf67f2..62c8de8d22 100644
--- a/railties/lib/rails/test_unit/testing.rake
+++ b/railties/lib/rails/test_unit/testing.rake
@@ -83,13 +83,17 @@ end
task :default => :test
desc 'Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)'
-task :test => %w(test:units test:functionals test:integration)
+task :test do
+ Rake::Task[ENV['TEST'] ? 'test:single' : 'test:run'].invoke
+end
namespace :test do
task :prepare do
# Placeholder task for other Railtie and plugins to enhance. See Active Record for an example.
end
+ task :run => %w(test:units test:functionals test:integration)
+
Rake::TestTask.new(:recent => "test:prepare") do |t|
since = TEST_CHANGES_SINCE
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +