Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request rails#9177 from zenspider/master
Browse files Browse the repository at this point in the history
Added test:all and test:all:db tasks to speed up full test runs
  • Loading branch information
tenderlove committed Feb 4, 2013
2 parents cb48bbe + 0e00637 commit 5efce21
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions railties/lib/rails/test_unit/testing.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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 } +
Expand Down

0 comments on commit 5efce21

Please sign in to comment.