diff options
| author | Zack Hobson | 2013-12-09 15:37:17 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-12-09 15:37:17 -0800 | 
| commit | 9e33c49a2f8ac38336f174a5dc53fae8372c61a6 (patch) | |
| tree | 1695b5d8a6a4e2dcbf97b92eeab8424da3728d00 | |
| parent | 247b264457178a54cbf937ae2d7ccd474bbeb9b2 (diff) | |
| download | hcl-9e33c49a2f8ac38336f174a5dc53fae8372c61a6.tar.bz2 | |
rbx coverage support
| -rw-r--r-- | Gemfile | 4 | ||||
| -rw-r--r-- | Gemfile.lock | 4 | ||||
| -rw-r--r-- | test/test_helper.rb | 5 | 
3 files changed, 11 insertions, 2 deletions
| @@ -4,4 +4,6 @@ gemspec  gem 'rubysl-abbrev', platform:'rbx'  gem 'rubysl-singleton', platform:'rbx'  gem 'rubysl-rexml', platform:'rbx' -gem 'rubysl-test-unit', platform:'rbx', group:'development' +gem 'rubysl-test-unit', platform:'rbx', group:'test' +gem 'rubysl-coverage', platform:'rbx', group:'test' +gem 'rubinius-coverage', platform:'rbx', group:'test' diff --git a/Gemfile.lock b/Gemfile.lock index 8a1401f..31ad6a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,8 +18,10 @@ GEM        metaclass (~> 0.0.1)      multi_json (1.8.2)      rake (10.1.0) +    rubinius-coverage (2.0.3)      rubygems-tasks (0.2.4)      rubysl-abbrev (2.0.4) +    rubysl-coverage (2.0.3)      rubysl-rexml (2.0.2)      rubysl-singleton (2.0.0)      rubysl-test-unit (2.0.3) @@ -39,8 +41,10 @@ DEPENDENCIES    hcl!    mocha    rake +  rubinius-coverage    rubygems-tasks    rubysl-abbrev +  rubysl-coverage    rubysl-rexml    rubysl-singleton    rubysl-test-unit diff --git a/test/test_helper.rb b/test/test_helper.rb index d155982..e5685ec 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,13 +1,16 @@  require 'bundler' -if ENV['COVERAGE'] == 'YES' +begin    require 'simplecov'    SimpleCov.start do      add_filter '/test/'      add_filter do |source_file|        source_file.lines.count < 15      end +    minimum_coverage 80    end +rescue LoadError => e +  $stderr.puts 'No test coverage tools found, skipping coverage check.'  end  require 'test/unit' | 
