Permalink
Browse files

Add Coveralls for code coverage reporting

  • Loading branch information...
1 parent c7ffd05 commit c0d6981a46e4594372dfe5aa6d0adf38f06bd8fa @sferik sferik committed Feb 25, 2013
Showing with 13 additions and 6 deletions.
  1. +1 −0 Gemfile
  2. +2 −0 README.md
  3. +10 −6 spec/helper.rb
View
@@ -10,6 +10,7 @@ group :development do
end
group :test do
+ gem 'coveralls', :require => false
gem 'json', '~> 1.7', :platforms => [:ruby_18, :jruby]
gem 'rspec', '>= 2.11'
gem 'simplecov', :require => false
View
@@ -4,11 +4,13 @@
[![Build Status](https://secure.travis-ci.org/pengwynn/octokit.png?branch=master)][travis]
[![Dependency Status](https://gemnasium.com/pengwynn/octokit.png?travis)][gemnasium]
[![Code Climate](https://codeclimate.com/github/pengwynn/octokit.png)][codeclimate]
+[![Coverage Status](https://coveralls.io/repos/pengwynn/octokit/badge.png?branch=master)][coveralls]
[gem]: https://rubygems.org/gems/octokit
[travis]: http://travis-ci.org/pengwynn/octokit
[gemnasium]: https://gemnasium.com/pengwynn/octokit
[codeclimate]: https://codeclimate.com/github/pengwynn/octokit
+[coveralls]: https://coveralls.io/r/pengwynn/octokit
Simple Ruby wrapper for the GitHub v3 API.
View
@@ -1,14 +1,18 @@
-unless ENV['CI']
- require 'simplecov'
- SimpleCov.start do
- add_filter "/spec"
- end
-end
+require 'simplecov'
+require 'coveralls'
+
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+]
+SimpleCov.start
require 'octokit'
require 'rspec'
require 'webmock/rspec'
+WebMock.disable_net_connect!(:allow => 'coveralls.io')
+
RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect

0 comments on commit c0d6981

Please sign in to comment.