Commit b7ed9cc03e215241c4d1e1374e05a2a697eb724d

Authored by Cyril Mougel
1 parent 4e542fc4
Exists in master and in 1 other branch production

Complete the coverall integrations

Add the coverall badge on README
Fix coverall coverage to add it on top of spec_helper
Add simplecov report generation with launch spec with COVERAGE=true env
Showing 3 changed files with 20 additions and 2 deletions   Show diff stats
.travis.yml
1 1 language: ruby
  2 +env:
  3 + - COVERAGE=true
2 4 rvm:
3 5 - 1.9.3
4 6 - 1.9.2
... ...
README.md
... ... @@ -4,6 +4,8 @@
4 4 [travis-ci-url]: http://travis-ci.org/errbit/errbit
5 5 [codeclimate-img-url]: https://codeclimate.com/github/errbit/errbit.png
6 6 [codeclimate-url]: https://codeclimate.com/github/errbit/errbit
  7 +[![Coverage Status](https://coveralls.io/repos/errbit/errbit/badge.png?branch=master)](https://coveralls.io/r/errbit/errbit)
  8 +
7 9  
8 10  
9 11 ### The open source, self-hosted error catcher
... ...
spec/spec_helper.rb
1 1 # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2 2 # from the project root directory.
3 3 ENV["RAILS_ENV"] ||= 'test'
  4 +
  5 +if ENV['COVERAGE']
  6 + require 'coveralls'
  7 + require 'simplecov'
  8 + Coveralls.wear!('rails') do
  9 + add_filter 'bundle'
  10 + end
  11 + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  12 + SimpleCov::Formatter::HTMLFormatter,
  13 + Coveralls::SimpleCov::Formatter
  14 + ]
  15 + SimpleCov.start('rails') do
  16 + add_filter 'bundle'
  17 + end
  18 +end
  19 +
4 20 require File.expand_path("../../config/environment", __FILE__)
5 21 require 'rspec/rails'
6 22 require 'database_cleaner'
... ... @@ -8,8 +24,6 @@ require 'webmock/rspec'
8 24 require 'xmpp4r'
9 25 require 'xmpp4r/muc'
10 26  
11   -require 'coveralls'
12   -Coveralls.wear!
13 27  
14 28 # Requires supporting files with custom matchers and macros, etc,
15 29 # in ./support/ and its subdirectories.
... ...