Skip to content

Commit

Permalink
Avoid weird Rakeiness
Browse files Browse the repository at this point in the history
  • Loading branch information
msavy committed Feb 23, 2012
1 parent e85cae0 commit 144d47b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Rakefile
Expand Up @@ -36,20 +36,16 @@ RSpec::Core::RakeTask.new('spec') do |t|
t.verbose = true
end

def coverage18(t)
require 'rcov'
t.rcov = true
t.rcov_opts = ["-Ispec:lib spec/rcov_helper.rb", '--exclude', 'spec,teamcity/*,/usr/lib/ruby/,.gem/ruby,/boxgrinder-build/,/gems/']
end

RSpec::Core::RakeTask.new('spec:coverage') do |t|
t.pattern = "spec/**/*-spec.rb"
t.rspec_opts = ['-r rubygems', '-r spec_helper', '-r boxgrinder-core', '--colour',
'--format', 'html', '--out', 'pkg/rspec_report.html', '-b']
t.verbose = true

if RUBY_VERSION =~ /^1.8/
coverage18(t)
require 'rcov'
t.rcov = true
t.rcov_opts = ["-Ispec:lib spec/rcov_helper.rb", '--exclude', 'spec,teamcity/*,/usr/lib/ruby/,.gem/ruby,/boxgrinder-build/,/gems/']
else
ENV['COVERAGE'] = 'true'
end
Expand Down

0 comments on commit 144d47b

Please sign in to comment.