From ce02bf9900eae0f15d7ff94755960f4440d5a3e5 Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Mon, 13 Jul 2015 22:41:47 -0400
Subject: [PATCH] Move coverage-related setup back to spec_helper

These tools must be loaded before our regular Rails environment.
---
 spec/spec_helper.rb      | 11 +++++++++++
 spec/support/coverage.rb |  8 --------
 2 files changed, 11 insertions(+), 8 deletions(-)
 delete mode 100644 spec/support/coverage.rb

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 682a8863bad4..d0f1873ee2d2 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'
diff --git a/spec/support/coverage.rb b/spec/support/coverage.rb
deleted file mode 100644
index a54bf03380ca..000000000000
--- a/spec/support/coverage.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-if ENV['SIMPLECOV']
-  require 'simplecov'
-end
-
-if ENV['COVERALLS']
-  require 'coveralls'
-  Coveralls.wear_merged!
-end
-- 
GitLab