Skip to content

Commit

Permalink
Using Coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
bfontaine committed Feb 2, 2014
1 parent 4eef600 commit 4fbdef6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
@@ -0,0 +1 @@
service_name: travis-ci
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -4,3 +4,5 @@ rvm:
- 1.9.3
- 2.0.0
- ruby-head
notifications:
email: false
1 change: 1 addition & 0 deletions Gemfile
@@ -1,5 +1,6 @@
source 'https://rubygems.org'

gem 'coveralls', require: false
gem 'rake', :group => :test
gem 'simplecov', :require => false, :group => :test
gem 'test-unit', :group => :test
2 changes: 2 additions & 0 deletions README.md
@@ -1,6 +1,8 @@
# Graphs.rb

[![Build Status](https://travis-ci.org/bfontaine/Graphs.rb.png)](https://travis-ci.org/bfontaine/Graphs.rb)
[![Gem Version](https://badge.fury.io/rb/graphs.png)](http://badge.fury.io/rb/graphs)
[![Coverage Status](https://coveralls.io/repos/bfontaine/Graphs.rb/badge.png)](https://coveralls.io/r/bfontaine/Graphs.rb)

This library allows you to perform some basic operations on graphs, with
import/export from/to JSON and [GDF][gdf-format] files.
Expand Down
5 changes: 5 additions & 0 deletions graphs.gemspec
Expand Up @@ -17,4 +17,9 @@ Gem::Specification.new do |s|
s.files = ['lib/graph.rb', 'lib/graphs/gdf.rb', 'lib/graphs/json.rb']
s.test_files = Dir.glob('tests/*tests.rb')
s.require_path = 'lib'

s.add_development_dependency 'simplecov'
s.add_development_dependency 'rake'
s.add_development_dependency 'test-unit'
s.add_development_dependency 'coveralls'
end
8 changes: 6 additions & 2 deletions tests/tests.rb
@@ -1,13 +1,17 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-

require 'coveralls'
Coveralls.wear!

require 'test/unit'
require 'tempfile'
require 'simplecov'
require 'tempfile'

test_dir = File.expand_path( File.dirname(__FILE__) )

SimpleCov.start { add_filter '/tests/' } if ENV['COVERAGE']
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start { add_filter '/tests/' }

require_relative '../lib/graph'
require_relative '../lib/graphs/gdf'
Expand Down

0 comments on commit 4fbdef6

Please sign in to comment.