1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Added Simplecov

This commit is contained in:
Norman Clarke 2012-05-22 16:03:27 -03:00
parent 3a35b8bd46
commit 93d68afc07
3 changed files with 16 additions and 0 deletions

View file

@ -3,4 +3,8 @@ gemspec
platform :mri do
gem "ruby-prof"
end
platform :mri_19 do
gem "simplecov"
end

View file

@ -24,6 +24,13 @@ Rake::TestTask.new do |t|
t.verbose = true
end
task :set_coverage_env do
ENV["COVERAGE"] = "true"
end
desc "Run Simplecov (only works on 1.9)"
task :coverage => [:set_coverage_env, :test]
gemspec = File.expand_path("../haml.gemspec", __FILE__)
if File.exist? gemspec
Gem::PackageTask.new(eval(File.read(gemspec))) { |pkg| }

View file

@ -1,3 +1,8 @@
if ENV["COVERAGE"]
require "simplecov"
SimpleCov.start
end
require 'rubygems'
gem "minitest"
require 'bundler/setup'