Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Coveralls for code coverage reporting

  • Loading branch information...
commit df7542f11fa0804d269d7743e0402ba3d0673cf8 1 parent b0641b5
@sferik sferik authored
Showing with 12 additions and 6 deletions.
  1. +1 −0  Gemfile
  2. +3 −0  README.md
  3. +8 −6 spec/helper.rb
View
1  Gemfile
@@ -24,6 +24,7 @@ group :development do
end
group :test do
+ gem 'coveralls', :require => false
gem 'rspec', '>= 2.11'
gem 'simplecov', :require => false
end
View
3  README.md
@@ -1,13 +1,16 @@
# MultiJSON
+
[![Gem Version](https://badge.fury.io/rb/multi_json.png)][gem]
[![Build Status](https://secure.travis-ci.org/intridea/multi_json.png?branch=master)][travis]
[![Dependency Status](https://gemnasium.com/intridea/multi_json.png?travis)][gemnasium]
[![Code Climate](https://codeclimate.com/github/intridea/multi_json.png)][codeclimate]
+[![Coverage Status](https://coveralls.io/repos/intridea/multi_json/badge.png?branch=master)][coveralls]
[gem]: https://rubygems.org/gems/multi_json
[travis]: http://travis-ci.org/intridea/multi_json
[gemnasium]: https://gemnasium.com/intridea/multi_json
[codeclimate]: https://codeclimate.com/github/intridea/multi_json
+[coveralls]: https://coveralls.io/r/intridea/multi_json
Lots of Ruby libraries parse JSON and everyone has their favorite JSON coder.
Instead of choosing a single JSON coder and forcing users of your library to be
View
14 spec/helper.rb
@@ -1,9 +1,11 @@
-if !ENV['CI'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
- require 'simplecov'
- SimpleCov.start do
- add_filter 'vendor'
- end
-end
+require 'simplecov'
+require 'coveralls'
+
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+]
+SimpleCov.start
require 'multi_json'
require 'rspec'
Please sign in to comment.
Something went wrong with that request. Please try again.