mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #9177 from zenspider/master
Added test:all and test:all:db tasks to speed up full test runs
This commit is contained in:
commit
5efce21a80
1 changed files with 12 additions and 0 deletions
|
@ -71,6 +71,18 @@ namespace :test do
|
||||||
end
|
end
|
||||||
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|
|
Rake::TestTask.new(recent: "test:prepare") do |t|
|
||||||
since = TEST_CHANGES_SINCE
|
since = TEST_CHANGES_SINCE
|
||||||
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +
|
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +
|
||||||
|
|
Loading…
Reference in a new issue