mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Added Simplecov
This commit is contained in:
parent
3a35b8bd46
commit
93d68afc07
3 changed files with 16 additions and 0 deletions
4
Gemfile
4
Gemfile
|
@ -3,4 +3,8 @@ gemspec
|
|||
|
||||
platform :mri do
|
||||
gem "ruby-prof"
|
||||
end
|
||||
|
||||
platform :mri_19 do
|
||||
gem "simplecov"
|
||||
end
|
7
Rakefile
7
Rakefile
|
@ -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| }
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
if ENV["COVERAGE"]
|
||||
require "simplecov"
|
||||
SimpleCov.start
|
||||
end
|
||||
|
||||
require 'rubygems'
|
||||
gem "minitest"
|
||||
require 'bundler/setup'
|
||||
|
|
Loading…
Reference in a new issue