Commit fe314d46 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Refactor coverage tools usage

rspec spec # no coverage generated
SIMPLECOV=true rspec spec # generate coverage locally into ./coverage
COVERALLS=true rspec spec # generate and send coverage data to coveralls.io
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 6298e557
require 'simplecov' unless ENV['CI']
if ENV['SIMPLECOV']
require 'simplecov'
end
if ENV['TRAVIS']
if ENV['COVERALLS']
require 'coveralls'
Coveralls.wear_merged!
Coveralls.wear_merged!('rails')
end
ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'rspec'
require 'rspec/expectations'
require 'database_cleaner'
require 'spinach/capybara'
require 'sidekiq/testing/inline'
%w(select2_helper test_env repo_helpers).each do |f|
require Rails.root.join('spec', 'support', f)
end
......
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'simplecov' unless ENV['CI']
if ENV['SIMPLECOV']
require 'simplecov'
end
if ENV['TRAVIS']
if ENV['COVERALLS']
require 'coveralls'
Coveralls.wear_merged!
Coveralls.wear_merged!('rails')
end
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rails'
require 'capybara/rspec'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment