0.0
No commit activity in last 3 years
No release in over 3 years
Use SimpleCov more easily as an RSpec formatter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0
 Project Readme

SpecCoverage

This formatter loads SimpleCov a code coverage reporting tool for Ruby 1.9. SimpleCov already does a good job in making it really easy to configure and load itself, but even good efforts can be improved upon.

The only problem is that you'll need to have something like a spec_helper to load it. You might not have this or you might find it ugly having to resort to environment variables to turn it off or on.

Installation

If you are using bundler, then don't forget to add simplecov to your Gemfile:

gem 'spec_coverage', :group => :test, :require => false

Usage

With this formatter, SimpleCov will start, and it will load a .coverage file in which you can add ruby code to configure SimpleCov in a non-obtrusive way. Configuration for a typical Rails app will look like this:

SimpleCov.start 'rails'

This formatter doesn't have any output, so you'll probably want to add another formatter. I prefer the documentation (if the number of specs is limited) or Fuubar formatter (for big spec suites):

rspec spec -f SpecCoverage -fd
rspec spec -f SpecCoverage -f Fuubar

More information on SimpleCov can be found here.

More information on RSpec formatters can be found here.