aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-02-04 14:59:44 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2013-02-04 14:59:44 -0800
commit5efce21a80eef52f565e3d59b6d649e8871631be (patch)
tree265af22a7077b451e35f8d864291759e3b691917
parentcb48bbeb005f3b8d68465604287e9df2f4572f89 (diff)
parent0e006373e000c2763876b3084175e95ee0e36be3 (diff)
downloadrails-5efce21a80eef52f565e3d59b6d649e8871631be.tar.gz
rails-5efce21a80eef52f565e3d59b6d649e8871631be.tar.bz2
rails-5efce21a80eef52f565e3d59b6d649e8871631be.zip
Merge pull request #9177 from zenspider/master
Added test:all and test:all:db tasks to speed up full test runs
-rw-r--r--railties/lib/rails/test_unit/testing.rake12
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake
index f0d46fd959..44485d9b14 100644
--- a/railties/lib/rails/test_unit/testing.rake
+++ b/railties/lib/rails/test_unit/testing.rake
@@ -71,6 +71,18 @@ namespace :test do
end
end
+ # Inspired by: http://ngauthier.com/2012/02/quick-tests-with-bash.html
+ desc "Run tests quickly by merging all types and not resetting db"
+ Rake::TestTask.new(:all) do |t|
+ t.libs << "test"
+ t.pattern = "test/**/*_test.rb"
+ end
+
+ namespace :all do
+ desc "Run tests quickly, but also reset db"
+ task :db => %w[db:test:prepare test:all]
+ end
+
Rake::TestTask.new(recent: "test:prepare") do |t|
since = TEST_CHANGES_SINCE
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +