Skip to content

Commit

Permalink
Fixed default 'rake test' for parent rakefile to run all the subgem t…
Browse files Browse the repository at this point in the history
…ests seperately
  • Loading branch information
nesquena committed Nov 23, 2009
1 parent 4be3fa2 commit 4fa83a7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Rakefile
Expand Up @@ -3,7 +3,9 @@ require "rake/gempackagetask"
require 'fileutils' require 'fileutils'
include FileUtils include FileUtils


gems = [ ROOT = File.dirname(__FILE__)

padrino_gems = [
"padrino-core", "padrino-core",
"padrino-cache", "padrino-cache",
"padrino-admin", "padrino-admin",
Expand All @@ -21,21 +23,29 @@ end
%w(clean install gemspec build release).each do |task_name| %w(clean install gemspec build release).each do |task_name|
desc "Run #{task_name} for all projects" desc "Run #{task_name} for all projects"
task task_name do task task_name do
gems.each do |dir| padrino_gems.each do |dir|
Dir.chdir(dir) { rake_command(task_name) } Dir.chdir(dir) { rake_command(task_name) }
end end
end end
end end


desc "Release all padrino gems" desc "Release all padrino gems"
task :publish do task :publish do
gems.each do |dir| padrino_gems.each do |dir|
Dir.chdir(dir) { rake_command("gemcutter:release") } Dir.chdir(dir) { rake_command("gemcutter:release") }
end end
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' require 'rake/testtask'
Rake::TestTask.new(:test) do |test| Rake::TestTask.new(:test_alt) do |test|
test.libs << 'lib' << 'test' test.libs << 'lib' << 'test'
test.pattern = 'padrino-*/test/**/test_*.rb' test.pattern = 'padrino-*/test/**/test_*.rb'
test.verbose = true test.verbose = true
Expand Down

0 comments on commit 4fa83a7

Please sign in to comment.