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'