summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-19 16:39:56 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-19 16:39:56 +0300
commitfe314d460efd18ea064df987a5a215904b95fd4e (patch)
treed6af4bdeb3edcd80b077ff35f5ba7a462f9310d0 /spec/spec_helper.rb
parent6298e55795f4cfa624bfd91bfe716cc21beb8544 (diff)
downloadgitlab-ce-fe314d460efd18ea064df987a5a215904b95fd4e.tar.gz
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: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 81e92a5913a..60322b67a79 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,14 +1,14 @@
-# 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'