Permalink
Browse files

Using simplecov for code coverage.

  • Loading branch information...
bfontaine committed Feb 13, 2013
1 parent 08d5260 commit 8e05758f86be29ab9b1b71e1cd357c6eeed420b8
Showing with 10 additions and 3 deletions.
  1. +3 −2 .gitignore
  2. +1 −0 Gemfile
  3. +6 −1 tests/tests.rb
View
@@ -1,5 +1,6 @@
-*.swp
*~
+*.swp
+*.swo
/*.rb
/*.gem
-*.swo
+/coverage
View
@@ -1,3 +1,4 @@
source :rubygems
gem 'rake', :group => :test
+gem 'simplecov', :require => false, :group => :test
View
@@ -3,9 +3,14 @@
require 'test/unit'
require 'tempfile'
+require 'simplecov'
+
+SimpleCov.start { add_filter '/tests/' } if ENV['COVERAGE']
+
require_relative '../lib/graph'
+require_relative '../lib/graphs/gdf'
+require_relative '../lib/graphs/json'
for t in Dir.glob( File.join( File.expand_path( File.dirname(__FILE__) ), '*_tests.rb' ) )
require t
end
-

0 comments on commit 8e05758

Please sign in to comment.