Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed default 'rake test' for parent rakefile to run all the subgem t…

…ests seperately
  • Loading branch information...
commit 4fa83a714557933662beac86296e4f9ff7349782 1 parent 4be3fa2
@nesquena nesquena authored
Showing with 14 additions and 4 deletions.
  1. +14 −4 Rakefile
View
18 Rakefile
@@ -3,7 +3,9 @@ require "rake/gempackagetask"
require 'fileutils'
include FileUtils
-gems = [
+ROOT = File.dirname(__FILE__)
+
+padrino_gems = [
"padrino-core",
"padrino-cache",
"padrino-admin",
@@ -21,7 +23,7 @@ end
%w(clean install gemspec build release).each do |task_name|
desc "Run #{task_name} for all projects"
task task_name do
- gems.each do |dir|
+ padrino_gems.each do |dir|
Dir.chdir(dir) { rake_command(task_name) }
end
end
@@ -29,13 +31,21 @@ end
desc "Release all padrino gems"
task :publish do
- gems.each do |dir|
+ padrino_gems.each do |dir|
Dir.chdir(dir) { rake_command("gemcutter:release") }
end
end
+desc "Run tests for all padrino stack gems"
+task :test do
+ # Omit the padrino metagem since no tests there
+ padrino_gems[0..-2].each do |gem_info|
+ Dir.chdir(File.join(ROOT, gem_info)) { rake_command "test" }
+ end
+end
+
require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
+Rake::TestTask.new(:test_alt) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'padrino-*/test/**/test_*.rb'
test.verbose = true
Please sign in to comment.
Something went wrong with that request. Please try again.