Running rake spec should run all specs (even those in sub-directories)

This commit is contained in:
Josh Knowles 2008-12-29 20:54:59 -05:00
parent 0938c6dafc
commit a569738542
1 changed files with 2 additions and 2 deletions

View File

@ -52,13 +52,13 @@ end
desc "Run API and Core specs"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/public/*_spec.rb'] + FileList['spec/private/*_spec.rb']
t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
end
desc "Run all specs in spec directory with RCov"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/public/*_spec.rb'] + FileList['spec/private/*_spec.rb']
t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
t.rcov = true
t.rcov_opts = lambda do
IO.readlines(File.dirname(__FILE__) + "/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten