Browse Source

added coveralls.io

André Bauer 8 years ago
parent
commit
d0d5f25e63
4 changed files with 9 additions and 2 deletions
  1. 1 0
      Gemfile
  2. 1 1
      README.md
  3. 1 0
      spec/rails_helper.rb
  4. 6 1
      test/test_helper.rb

+ 1 - 0
Gemfile

@@ -108,6 +108,7 @@ group :development, :test do
   gem 'pre-commit'
   gem 'rubocop'
   gem 'coffeelint'
+  gem 'coveralls',         require: false
 
   # changelog generation
   gem 'github_changelog_generator'

+ 1 - 1
README.md

@@ -12,7 +12,7 @@ You're going to love Zammad!
 ## Statusbadges
 
 - Build: [![Build Status](https://travis-ci.org/zammad/zammad.svg?branch=develop)](https://travis-ci.org/zammad/zammad)
-- Code: [![Code Climate](https://codeclimate.com/github/zammad/zammad/badges/gpa.svg)](https://codeclimate.com/github/zammad/zammad)
+- Code: [![Code Climate](https://codeclimate.com/github/zammad/zammad/badges/gpa.svg)](https://codeclimate.com/github/zammad/zammad) [![Coverage Status](https://coveralls.io/repos/github/zammad/zammad/badge.svg)](https://coveralls.io/github/zammad/zammad)
 - Docs: [![Documentation Status](https://readthedocs.org/projects/zammad/badge/?version=latest)](https://docs.zammad.org)
 - Docker Image: [![](https://images.microbadger.com/badges/image/zammad/zammad.svg)](https://microbadger.com/images/zammad/zammad) [![](https://images.microbadger.com/badges/version/zammad/zammad.svg)](https://hub.docker.com/r/zammad/zammad/)
 

+ 1 - 0
spec/rails_helper.rb

@@ -1,6 +1,7 @@
 # This file is copied to spec/ when you run 'rails generate rspec:install'
 ENV['RAILS_ENV'] ||= 'test'
 require File.expand_path('../../config/environment', __FILE__)
+
 # Prevent database truncation if the environment is production
 abort('The Rails environment is running in production mode!') if Rails.env.production?
 require 'spec_helper'

+ 6 - 1
test/test_helper.rb

@@ -4,6 +4,8 @@ require 'rails/test_help'
 require 'cache'
 require 'simplecov'
 require 'simplecov-rcov'
+require 'coveralls'
+Coveralls.wear!('rails')
 
 #ActiveSupport::TestCase.test_order = :sorted
 
@@ -14,7 +16,10 @@ class ActiveSupport::TestCase
   #
   # Note: You'll currently still have to declare fixtures explicitly in integration tests
   # -- they do not yet inherit this setting
-  SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+    SimpleCov::Formatter::RcovFormatter,
+    Coveralls::SimpleCov::Formatter
+  ]
   SimpleCov.start
   fixtures :all