Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-14 05:41:47 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-07-14 05:41:47 +0300
commitce02bf9900eae0f15d7ff94755960f4440d5a3e5 (patch)
treeef427f81addd79fc7b40e2489ccdc5f91214412f /spec/spec_helper.rb
parent59d7f4c97ff2869824cb5b1b0fbe14c983dab75d (diff)
Move coverage-related setup back to spec_helper
These tools must be loaded before our regular Rails environment.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 682a8863bad..d0f1873ee2d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,4 +1,15 @@
+if ENV['SIMPLECOV']
+ require 'simplecov'
+ SimpleCov.start :rails
+end
+
+if ENV['COVERALLS']
+ require 'coveralls'
+ Coveralls.wear_merged!
+end
+
ENV["RAILS_ENV"] ||= 'test'
+
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'shoulda/matchers'