From 18794560f59fde6e902480f3365e5070995a844e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inge=20J=C3=B8rgensen?= Date: Wed, 24 Oct 2012 12:56:28 +0200 Subject: [PATCH] SimpleCov configuration [skip ci] --- .gitignore | 1 + .simplecov | 3 +++ Gemfile | 4 ++++ Gemfile.lock | 5 +++++ spec/spec_helper.rb | 9 +++++++++ 5 files changed, 22 insertions(+) create mode 100644 .simplecov diff --git a/.gitignore b/.gitignore index ac76fda3..f6c49647 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .bundle +coverage/* log/*.log log/*.log.* log/*.lck diff --git a/.simplecov b/.simplecov new file mode 100644 index 00000000..ba875361 --- /dev/null +++ b/.simplecov @@ -0,0 +1,3 @@ +SimpleCov.start 'rails' do + add_filter "/.bundle/" +end \ No newline at end of file diff --git a/Gemfile b/Gemfile index 479681e7..7d66189a 100644 --- a/Gemfile +++ b/Gemfile @@ -63,6 +63,10 @@ group :development do gem 'guard-rspec' end +group :test do + gem 'simplecov', :require => false +end + group :test, :development do gem 'sunspot_solr' gem 'sunspot-rails-tester' diff --git a/Gemfile.lock b/Gemfile.lock index b77a883c..1b14519a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -202,6 +202,10 @@ GEM rubyzip shoulda-matchers (1.1.0) activesupport (>= 3.0.0) + simplecov (0.7.1) + multi_json (~> 1.0) + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) spork (0.9.2) sprockets (2.1.3) hike (~> 1.2) @@ -265,6 +269,7 @@ DEPENDENCIES ruby_gntp sass-rails shoulda-matchers + simplecov spork sqlite3 sunspot-rails-tester diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6d3a04d1..53f56d70 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,10 @@ # if you change any configuration or code from libraries loaded here, you'll # need to restart spork for it take effect. + unless ENV['DRB'] + require 'simplecov' + 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__) @@ -69,6 +73,11 @@ end Spork.each_run do + + if ENV['DRB'] + require 'simplecov' + end + # This code will be run each time you run your specs. # Requires supporting ruby files with custom matchers and macros, etc,