Commit 6ab2188766d0281e33d349fde77bdc68ee825cc1

Authored by Diego Araújo
1 parent 4b8f3ae4
Exists in colab and in 2 other branches master, stable

Make travis fail if coverage is less the 100%

This is meant to ensure we remember when we commit changes without
tests. Also, to be able to run all the tests locally without worrying
about that, we make the minimum coverage only required if the
environment variable 'CI' is set to true. In practice, this means we
only check minimun coverage if we are building the environment on
travis.

Also remove some default configurations for Rails on Simplecov.

Updates CHANGELOG
Showing 2 changed files with 10 additions and 9 deletions   Show diff stats
CHANGELOG.rdoc
... ... @@ -13,10 +13,13 @@ Prezento is the web interface for Mezuro.
13 13 * Pluralize navigation menu links
14 14 * Add missing translation for CompoundMetric
15 15 * Make Compound Metric Config. metric list not include Hotspot metrics
16   -* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view
  16 +* Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view
17 17 * Show the notify push url for the repository's owner (Gitlab only)
18 18 * Support for hiding repositories
19 19 * Fix home latest content caching effectiveness
  20 +* Update travis script
  21 +* Support for ruby 2.0.0-p598 (CentOS 7 default) and 2.1.5 (Debian 8 default)
  22 +* Make Travis fail if minimun unit test coverage is below 100%
20 23  
21 24 == v0.11.3 - 01/04/2016
22 25  
... ...
spec/rails_helper.rb
... ... @@ -3,17 +3,15 @@ require "codeclimate-test-reporter"
3 3 CodeClimate::TestReporter.start
4 4 require 'simplecov'
5 5  
6   -SimpleCov.start do
  6 +SimpleCov.start 'rails' do
  7 + # Minimum coverage is only desired on CI tools when building the environment. CI is a
  8 + # default environment variable used by Travis. For reference, see here:
  9 + # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
  10 + minimum_coverage 100 if ENV["CI"] == 'true'
7 11 coverage_dir 'coverage/rspec'
8 12  
9   - add_group "Models", "app/models"
10   - add_group "Controllers", "app/controllers"
11   - add_group "Helpers", "app/helpers"
12   - add_group "Mailers", "app/mailers"
13   -
14 13 add_filter "/spec/"
15 14 add_filter "/features/"
16   - add_filter "/config/"
17 15 end
18 16  
19 17 # This file is copied to spec/ when you run 'rails generate rspec:install'
... ... @@ -61,4 +59,4 @@ RSpec.configure do |config|
61 59  
62 60 # Devise helpers
63 61 config.include Devise::TestHelpers, :type => :controller
64   -end
65 62 \ No newline at end of file
  63 +end
... ...