summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/spec_helper.rb11
-rw-r--r--spec/support/coverage.rb8
2 files changed, 11 insertions, 8 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'
diff --git a/spec/support/coverage.rb b/spec/support/coverage.rb
deleted file mode 100644
index a54bf03380c..00000000000
--- 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