Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

RSpec | Simple-Covでカバレッジの計測

概要

SimpleCovでカバレッジレポートの出力

内容

SimpleCovでカバレッジレポートの出力します。

導入

Gemfileに以下を追加

gem "simplecov", "~> 0.7.1"

spec_helper.rbに下記を追加

require "simplecov"
SimpleCov.start "rails"

確認

bundle exec rake spec

%RAILS_PROJECT%/coverage/index.htmlを確認