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' require 'coveralls'
Coveralls.wear_merged! Coveralls.wear_merged!('rails')
end end
ENV['RAILS_ENV'] = 'test' ENV['RAILS_ENV'] = 'test'
require './config/environment' require './config/environment'
require 'rspec' require 'rspec'
require 'rspec/expectations' require 'rspec/expectations'
require 'database_cleaner' require 'database_cleaner'
require 'spinach/capybara' require 'spinach/capybara'
require 'sidekiq/testing/inline' require 'sidekiq/testing/inline'
%w(select2_helper test_env repo_helpers).each do |f| %w(select2_helper test_env repo_helpers).each do |f|
require Rails.root.join('spec', 'support', f) require Rails.root.join('spec', 'support', f)
end end
......
# This file is copied to spec/ when you run 'rails generate rspec:install' if ENV['SIMPLECOV']
ENV["RAILS_ENV"] ||= 'test' require 'simplecov'
require File.expand_path("../../config/environment", __FILE__) end
require 'simplecov' unless ENV['CI']
if ENV['TRAVIS'] if ENV['COVERALLS']
require 'coveralls' require 'coveralls'
Coveralls.wear_merged! Coveralls.wear_merged!('rails')
end end
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails' require 'rspec/rails'
require 'capybara/rails' require 'capybara/rails'
require 'capybara/rspec' 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