summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-05-20 11:47:38 +0200
committerAzul <azul@riseup.net>2016-05-20 16:35:55 +0200
commitf20ecdfb249128ba79da069407dce32f6f7e2fca (patch)
treec38f373f27d972e554dae16c77ccd0d6a9fdc833 /lib
parente542a3056c27fd662ef767b6720861035f6dbb1c (diff)
include engine tests in default test
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/test.rake15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake
index d96b625..9859729 100644
--- a/lib/tasks/test.rake
+++ b/lib/tasks/test.rake
@@ -1,10 +1,15 @@
namespace :test do
- [:units, :functionals, :integration].each do |type|
- Rails::SubTestTask.new(type => "test:prepare") do |t|
- t.libs << "test"
- subdir = type.to_s.singularize
- t.pattern = "engines/*/test/#{subdir}/**/*_test.rb"
+ namespace :engines do
+ [:units, :functionals, :integration].each do |type|
+ desc "Test engine #{type}"
+ Rails::TestTask.new(type => "test:prepare") do |t|
+ t.libs << "test"
+ subdir = type.to_s.singularize
+ t.pattern = "engines/*/test/#{subdir}/**/*_test.rb"
+ end
+ Rake::Task["test:#{type}"].enhance ["test:engines:#{type}"]
+ Rake::Task["test"].enhance ["test:engines:#{type}"]
end
end