data/tasks/test.rake in bones-1.3.3 vs data/tasks/test.rake in bones-1.3.4
- old
+ new
@@ -4,27 +4,27 @@
namespace :test do
Rake::TestTask.new(:run) do |t|
t.libs = PROJ.libs
- t.test_files = if test ?f, PROJ.test_file then [PROJ.test_file]
+ t.test_files = if test(?f, PROJ.test_file) then [PROJ.test_file]
else PROJ.tests end
t.ruby_opts += PROJ.ruby_opts
t.ruby_opts += PROJ.test_opts
end
if HAVE_RCOV
desc 'Run rcov on the unit tests'
task :rcov => :clobber_rcov do
- opts = PROJ.rcov_opts.join(' ')
- files = if test ?f, PROJ.test_file then [PROJ.test_file]
+ opts = PROJ.rcov_opts.dup << '-o' << PROJ.rcov_dir
+ opts = opts.join(' ')
+ files = if test(?f, PROJ.test_file) then [PROJ.test_file]
else PROJ.tests end
files = files.join(' ')
sh "#{RCOV} #{files} #{opts}"
end
- desc 'Remove rcov products'
task :clobber_rcov do
rm_r 'coverage' rescue nil
end
end
@@ -32,9 +32,7 @@
desc 'Alias to test:run'
task :test => 'test:run'
task :clobber => 'test:clobber_rcov' if HAVE_RCOV
-
-remove_desc_for_task %w(test:clobber_rcov)
# EOF