Posted at

Rails+RSpec+SporkにSimpleCovを導入

More than 5 years have passed since last update.

READMEを読みながらやってみた。

spec/spec_helper.rb

Spork.prefork do

unless ENV['DRB']
require 'simplecov'
end

# other code ...
end

Spork.each_run do
if ENV['DRB']
require 'simplecov'
end

# other code ...
end

.simplecov

SimpleCov.start 'rails' do

add_filter "/spec/"
end