Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Apr 12, 2014
1 parent 1dba31b commit 0bfa860
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
@@ -0,0 +1,2 @@
service_name: travis-ci

1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ Gemfile.lock
demo
**/*.swp
.bundle
coverage
4 changes: 4 additions & 0 deletions .simplecov
@@ -0,0 +1,4 @@
SimpleCov.start do
add_filter 'features/'
end

1 change: 1 addition & 0 deletions .travis.yml
@@ -1,5 +1,6 @@
language: ruby
bundler_args: --without debug
script: bundle exec rake test_with_coveralls
rvm:
- 2.1.0
- 2.0.0
Expand Down
6 changes: 5 additions & 1 deletion Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
gemspec

group 'development' do
group :development do
gem 'rake'
gem 'redgreen', '~> 1.2'
gem 'shoulda', '~> 3.5'
Expand All @@ -13,6 +13,10 @@ group 'development' do
gem 'launchy', '~> 2.1.2'

gem 'unicode_utils'

gem 'simplecov', '~>0.8', :require => false
gem 'rubinius-coverage', :platform => :rbx
gem 'coveralls', :require => false
end

group :debug do
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -10,6 +10,7 @@ For additional features you may also want to take a look at
[jekyll-scholar-extras](https://github.com/jgoodall/jekyll-scholar-extras).

[![Build Status](https://travis-ci.org/inukshuk/jekyll-scholar.png?branch=master)](https://travis-ci.org/inukshuk/jekyll-scholar)
[![Coverage Status](https://coveralls.io/repos/inukshuk/jekyll-scholar/badge.png)](https://coveralls.io/r/inukshuk/jekyll-scholar)
[![Dependency Status](https://gemnasium.com/inukshuk/jekyll-scholar.png)](https://gemnasium.com/inukshuk/jekyll-scholar)

Installation
Expand Down
4 changes: 4 additions & 0 deletions Rakefile
Expand Up @@ -15,6 +15,10 @@ Cucumber::Rake::Task.new(:features)

task :default => [:features]

require 'coveralls/rake/task'
Coveralls::RakeTask.new
task :test_with_coveralls => [:features, 'coveralls:push']

task :release do |t|
system "gem build jekyll-scholar.gemspec"
system "git tag v#{Jekyll::Scholar::VERSION}"
Expand Down
14 changes: 10 additions & 4 deletions features/support/env.rb
@@ -1,14 +1,20 @@
require 'rr'
require 'test/unit'

require 'jekyll/scholar'
begin
require 'simplecov'
require 'coveralls' if ENV['CI']
rescue LoadError
# ignore
end

begin
require 'debugger'
rescue LoadError
# ignore
end

require 'rr'
require 'test/unit'

require 'jekyll/scholar'

World do
include Test::Unit::Assertions
Expand Down

0 comments on commit 0bfa860

Please sign in to comment.