SimpleCov

Code coverage for ruby 1.9+ with a powerfull configuration libary and au
Icons/chart bar
Used 22 times
Created by
E Edgar Ferreira

Usage

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/Xg8s5P"
Template Source

Review the code before running this template on your machine.

gem 'simplecov', require: false, group: :test

Bundler.with_unbundled_env { run 'bundle install' }

files = [
  'test/test_helper.rb',
  'spec/spec_helper.rb'
]
files.each do |filename|
  if File.exist?(filename)
	prepend_to_file filename, <<~TEMPLATE
		require 'simplecov'
		SimpleCov.start

		TEMPLATE
  end
end

rails_command("test") if yes?("Would you like to run your test suite and generate coverage reports?")
Comments

Sign up or Login to leave a comment.