Skip to content
SimpleCov formatter that prints nice colored summary for your coverage straight into your console.
Ruby
Find file
Latest commit e140adf Oct 26, 2014 @inossidabile Merge pull request #2 from RX14/master
Switch string color gems to colorize
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
simplecov-summary.gemspec

README.md

Simplecov::Summary

SimpleCov formatter that prints nice colored summary for your coverage straight into your console.

endorse

Installation

Add this line to your application's Gemfile:

gem 'simplecov-summary'

And then execute:

$ bundle

Or install it yourself as:

$ gem install simplecov-summary

Example

Below you can find the example for a typical Rails RSpec configuration. The following setup will silently generate HTML output and show you colored summary on each run.

  require 'simplecov'

  SimpleCov.start do
    add_filter '/spec/'
    add_filter '/config/'
    add_filter '/db/'
    add_filter '/vendor/'

    add_group 'Controllers', 'app/controllers'
    add_group 'Models', 'app/models'
    add_group 'Decorators', 'app/decorators'
    add_group 'Helpers', 'app/helpers'
    add_group 'Libraries', 'lib'

    at_exit do
    end
  end

  RSpec.configure do |config|
    config.after(:suite) do
      if SimpleCov.running
        silence_stream(STDOUT) do
          SimpleCov::Formatter::HTMLFormatter.new.format(SimpleCov.result)
        end

        SimpleCov::Formatter::SummaryFormatter.new.format(SimpleCov.result)
      end
    end
  end

License

It is free software, and may be redistributed under the terms of MIT license.

Bitdeli Badge

Something went wrong with that request. Please try again.