Skip to content

Instantly share code, notes, and snippets.

@jaryl
Created September 13, 2013 18:53
Show Gist options
  • Save jaryl/6554599 to your computer and use it in GitHub Desktop.
Save jaryl/6554599 to your computer and use it in GitHub Desktop.
SpecHelper configuration for sending coverage reports to Coveralls and CodeClimate.
require 'codeclimate-test-reporter'
require 'simplecov'
require 'coveralls'
formatters = [SimpleCov::Formatter::HTMLFormatter]
formatters << Coveralls::SimpleCov::Formatter if ENV['COVERALLS_REPO_TOKEN']
formatters << CodeClimate::TestReporter::Formatter if ENV['CODECLIMATE_REPO_TOKEN']
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]
SimpleCov.start 'rails'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment