Permalink
Browse files

Add simplecov

  • Loading branch information...
1 parent 5ab0f1a commit bb3dbdb214a3ae183e2190bd502978c59a317fcd @martinemde martinemde committed Feb 10, 2012
Showing with 19 additions and 3 deletions.
  1. +3 −3 .gitignore
  2. +4 −0 Gemfile
  3. +7 −0 Rakefile
  4. +5 −0 spec/spec_helper.rb
View
6 .gitignore
@@ -20,9 +20,9 @@ pkg
.bundle
*.gem
Gemfile.lock
+coverage
+.rvmrc
+*.rbc
## PROJECT::SPECIFIC
cloud.yml
-
-.rvmrc
-*.rbc
View
4 Gemfile
@@ -3,3 +3,7 @@ source :rubygems
gemspec
gem 'app_env_resolver', :path => '../app_env_resolver'
+
+group :coverage do
+ gem 'simplecov', :require => false
+end
View
7 Rakefile
@@ -3,6 +3,13 @@ RSpec::Core::RakeTask.new do |t|
t.rspec_opts = %w[--color]
t.pattern = 'spec/**/*_spec.rb'
end
+
+task :coverage => [:coverage_env, :spec]
+
+task :coverage_env do
+ ENV['COVERAGE'] = '1'
+end
+
task :test => :spec
task :default => :spec
View
5 spec/spec_helper.rb
@@ -2,6 +2,11 @@
raise "don't require the spec helper twice!"
end
+if ENV['COVERAGE']
+ require 'simplecov'
+ SimpleCov.start
+end
+
EY_ROOT = File.expand_path("../..", __FILE__)
require 'rubygems'
require 'bundler/setup'

0 comments on commit bb3dbdb

Please sign in to comment.