mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Merge pull request #192 from tsujigiri/coverage
Make tests fail if test coverage drops
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,7 +3,8 @@ api_key.txt
|
||||
config/app_config.yml
|
||||
config/database.yml
|
||||
config/newrelic.yml
|
||||
coverage
|
||||
coverage/*
|
||||
!coverage/.last_run.json
|
||||
db/*.sqlite3
|
||||
development.log
|
||||
dump.rdb
|
||||
|
||||
3
.simplecov
Normal file
3
.simplecov
Normal file
@@ -0,0 +1,3 @@
|
||||
SimpleCov.start('rails') do
|
||||
refuse_coverage_drop
|
||||
end
|
||||
@@ -1,7 +1,5 @@
|
||||
language: ruby # Defaults to ruby, but travis-ci recommends making this explicit.
|
||||
rvm:
|
||||
- 2.0
|
||||
- 2.1
|
||||
- 2.2
|
||||
env: DB=postgres CI=1
|
||||
bundler_args: --without development debug
|
||||
|
||||
@@ -5,6 +5,8 @@ rescue LoadError
|
||||
end
|
||||
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
||||
|
||||
require 'simplecov' if ENV['RAILS_ENV'] == 'test'
|
||||
|
||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||
require File.expand_path('../../config/boot', __FILE__)
|
||||
require 'rails/commands'
|
||||
|
||||
5
coverage/.last_run.json
Normal file
5
coverage/.last_run.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"result": {
|
||||
"covered_percent": 51.52
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
|
||||
require 'simplecov'
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'sidekiq/testing'
|
||||
|
||||
Reference in New Issue
Block a user