Skip to content

Commit

Permalink
add coveralls coverage stats
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 1, 2014
1 parent c6e582d commit d22384b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Expand Up @@ -3,6 +3,10 @@ source 'https://rubygems.org'
# Please see blacklight.gemspec for dependency information.
gemspec


gem 'simplecov', require: false
gem 'coveralls', require: false

group :test do
gem 'devise'
gem 'devise-guests'
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/rails3.gemfile
Expand Up @@ -8,6 +8,8 @@ gem 'rails', "~> 3.2"
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby

group :test do
gem 'simplecov', require: false
gem 'coveralls', require: false
gem 'devise'
gem 'devise-guests'
gem "bootstrap-sass"
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/rails4.gemfile
Expand Up @@ -8,6 +8,8 @@ gem 'rails', '~> 4.0.0'
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby

group :test do
gem 'simplecov', require: false
gem 'coveralls', require: false
gem 'devise'
gem 'devise-guests'
gem "bootstrap-sass"
Expand Down
7 changes: 4 additions & 3 deletions spec/spec_helper.rb
Expand Up @@ -5,12 +5,13 @@

ENV["RAILS_ENV"] ||= 'test'

ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
if ENV['COVERAGE'] and ruby_engine != "jruby"
if ENV["COVERAGE"] or ENV["CI"]
require 'simplecov'
require 'coveralls'

SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
root File.expand_path(File.dirname(__FILE__) + "../../..")
add_filter "/spec/"
end
end

Expand Down

0 comments on commit d22384b

Please sign in to comment.