Permalink
Browse files

Add Coveralls for code coverage reporting

  • Loading branch information...
1 parent 5b8612d commit 1b1de2189a11a855c82705fb711cec33c4943936 @sferik committed Feb 26, 2013
Showing with 11 additions and 10 deletions.
  1. +1 −0 Gemfile
  2. +2 −0 README.md
  3. +0 −6 Rakefile
  4. +8 −4 spec/spec_helper.rb
View
@@ -42,6 +42,7 @@ group :test do
gem 'cancan', '>= 1.6'
gem 'capybara', '~> 1.1'
gem 'carrierwave', '>= 0.8'
+ gem 'coveralls', :require => false
gem 'database_cleaner', '>= 0.8'
gem 'devise', '>= 2.1'
gem 'dragonfly', '>= 0.9'
View
@@ -3,13 +3,15 @@
[![Build Status](https://secure.travis-ci.org/sferik/rails_admin.png?branch=master)][travis]
[![Dependency Status](https://gemnasium.com/sferik/rails_admin.png?travis)][gemnasium]
[![Code Climate](https://codeclimate.com/github/sferik/rails_admin.png)][codeclimate]
+[![Coverage Status](https://coveralls.io/repos/sferik/rails_admin/badge.png?branch=master)][coveralls]
[![Pledgie](http://www.pledgie.com/campaigns/15917.png)][pledgie]
[![Flattr](http://api.flattr.com/button/flattr-badge-large.png)][flattr]
[gem]: https://rubygems.org/gems/rails_admin
[travis]: http://travis-ci.org/sferik/rails_admin
[gemnasium]: https://gemnasium.com/sferik/rails_admin
[codeclimate]: https://codeclimate.com/github/sferik/rails_admin
+[coveralls]: https://coveralls.io/r/sferik/rails_admin
[pledgie]: http://www.pledgie.com/campaigns/15917
[flattr]: http://flattr.com/thing/799416/sferikrailsadmin-on-GitHub
View
@@ -11,9 +11,3 @@ RSpec::Core::RakeTask.new(:spec)
task :test => :spec
task :default => :spec
-namespace :spec do
- task :coverage do
- ENV['INVOKE_SIMPLECOV'] = 'true'
- Rake::Task[:spec].invoke
- end
-end
View
@@ -5,10 +5,14 @@
CI_TARGET_ORMS = [:active_record, :mongoid]
PK_COLUMN = {:active_record=>:id, :mongoid=>:_id}[CI_ORM]
-if ENV['INVOKE_SIMPLECOV']
- require 'simplecov'
- SimpleCov.start 'rails'
-end
+require 'simplecov'
+require 'coveralls'
+
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+]
+SimpleCov.start
require File.expand_path('../dummy_app/config/environment', __FILE__)

0 comments on commit 1b1de21

Please sign in to comment.