From 09cd0d1790a60efd0f22f16f2697c39e774bc4bb Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Dec 2018 15:51:50 -0600 Subject: [PATCH] Setup simplecov --- script/rails | 5 +++++ spec/rails_helper.rb | 2 ++ 2 files changed, 7 insertions(+) diff --git a/script/rails b/script/rails index f8da2cff..c5b1430b 100755 --- a/script/rails +++ b/script/rails @@ -1,5 +1,10 @@ #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. +if ENV['RAILS_ENV'] == 'test' + require 'simplecov' + SimpleCov.start 'rails' + puts "required simplecov" +end APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 43fb88c6..1f9a9a41 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,3 +1,5 @@ +require 'simplecov' +SimpleCov.start # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later # This file is copied to spec/ when you run 'rails generate rspec:install' ENV['RAILS_ENV'] ||= 'test'