diff --git a/.gitignore b/.gitignore index 84b977791b..bb272447ed 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ spec/support/data/failed_remote/* *.swo cartodb-importer env +coverage diff --git a/Gemfile b/Gemfile index 95634d2ff9..5171acf853 100644 --- a/Gemfile +++ b/Gemfile @@ -39,6 +39,8 @@ gem "rubyzip", "~> 0.9.6.1" gem "builder" gem "state_machine", "~> 1.0" +gem 'simplecov', :require => false, :group => :test + group :development, :test do gem 'poltergeist', '0.6.0' gem 'minitest', '~> 2.0.2', :require => 'minitest/unit' diff --git a/Gemfile.lock b/Gemfile.lock index e821a92f90..ad18595534 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -226,6 +226,10 @@ GEM sequel_pg (1.2.0) pg (>= 0.8.0) sequel (>= 3.29.0) + simplecov (0.6.4) + multi_json (~> 1.0) + simplecov-html (~> 0.5.3) + simplecov-html (0.5.3) sinatra (1.2.8) rack (~> 1.1) tilt (>= 1.2.2, < 2.0) @@ -299,6 +303,7 @@ DEPENDENCIES sequel-rails-cartodb (= 0.1.7) sequel_column_type_array (~> 0.0.2) sequel_pg (= 1.2.0) + simplecov spreadsheet (~> 0.6.5.9) state_machine (~> 1.0) statsd-client diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d8eb422cbd..30fd5a514a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,10 @@ +require 'simplecov' +SimpleCov.start do + add_filter '/spec/' + add_filter '/config/' + add_filter '/vendor/' +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__)