Add a simple rakefile for running tests

This commit is contained in:
R. Tyler Croy 2012-08-12 15:27:52 -07:00
parent b2d0fd8eaf
commit 431f556546
1 changed files with 17 additions and 0 deletions

17
Rakefile Normal file
View File

@ -0,0 +1,17 @@
require 'rspec/core/rake_task'
RSPEC_OPTS = '--color --fail-fast'
namespace :spec do
namespace :modules do
Dir.glob('modules/*') do |p|
if File.directory?(File.join(p, 'spec'))
name = File.basename(p)
desc "Run rspec-puppet tests for the #{name} module"
task name.to_sym do |t|
sh "cd #{p} && rspec #{RSPEC_OPTS}"
end
end
end
end
end