Skip to content

Commit

Permalink
Added ability to do code coverage reports on specs when using ruby 1.…
Browse files Browse the repository at this point in the history
…9. Use 'COVERAGE=true rspec spec/' to activate.
  • Loading branch information
steveyken committed Dec 3, 2011
1 parent eae27a4 commit 7eda75b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ end

group :test do
gem 'factory_girl_rails', '~> 1.0.1'
gem 'simplecov', :platform => :mri_19
end

# Rails3 plugins that we use and their source repositories:
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ GEM
simple_form (1.5.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
simplecov (0.5.4)
multi_json (~> 1.0.3)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
Expand Down Expand Up @@ -195,6 +199,7 @@ DEPENDENCIES
ruby-debug19
sass-rails (~> 3.1.1)
simple_form (~> 1.5.2)
simplecov
test-unit (= 1.2.3)
therubyracer
uglifier
Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start 'rails'
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
Expand Down

0 comments on commit 7eda75b

Please sign in to comment.