This is a custom SimpleCov formatter that displays table-formatted summaries of your coverage reports in the terminal. It prints the total coverage ratio of each source file, along with a compressed list of the uncovered lines.
βββββββββββββββββββββ¬βββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
Files β Coverage β Uncovered lines
βββββββββββββββββββββΌβββββββββββΌββββββββββββββββββββββββββββββββββββββ
lib/foo.rb β 78.0% β 11,12,20-27
lib/foo/bar.rb β 100.0% β
lib/foo/baz.rb β 33.5% β 3,5,63-75,122,128
βββββββββββββββββββββ΄βββββββββββ΄ββββββββββββββββββββββββββββββββββββββ
gem install simplecov-table
require 'simplecov'
require 'simplecov-table'
SimpleCov.formatter = SimpleCov::Formatter::TableFormatter
SimpleCov.start
Or, if you want to use several formatters:
require 'simplecov'
require 'simplecov-table'
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::TableFormatter,
])
SimpleCov.start
See the full changelog here.
Contributions are welcomed! Please open an issue before submitting substantial changes.
simplecov-erb
β Flexible plain-text formatter that uses ERB templatessimplecov-lcov
β Simple LCOV formatter
ISC