Permalink
Browse files

Tweak Rakefile spec tasks to be a bit cleaner

  • Loading branch information...
kballard committed Jul 21, 2008
1 parent d3c3322 commit c1a6f99bb1afa775515836f9cfe6be86adf33d07
Showing with 4 additions and 13 deletions.
  1. +4 −13 Rakefile
View
@@ -23,12 +23,13 @@ end
begin
require 'spec/rake/spectask'
- def spec_task(cmd=nil, rcov=nil)
+ def spec_task(cmd=nil, rcov=false)
name = "spec"
name << ":rcov" if rcov
root_name = name.dup
cmd ||= "shared"
name << ":#{cmd}"
+ desc ''
Spec::Rake::SpecTask.new(name) do |t|
t.spec_files = FileList["spec#{"/#{cmd}" if cmd}/*_spec.rb"]
t.spec_opts = ['--color']
@@ -38,24 +39,14 @@ begin
end
end
task root_name => name
+ spec_task cmd, true unless rcov
end
desc 'Run specs'
task :spec
desc 'Run specs using RCov'
task :'spec:shared'
- # spec_task
- desc ''
spec_task
-
- desc ''
- spec_task(nil, true)
- task 'spec:rcov' => ['spec:rcov:github']
-
- desc ''
- spec_task('github')
-
- desc ''
- spec_task('github', true)
+ spec_task 'github'
end

0 comments on commit c1a6f99

Please sign in to comment.