From 203a7a244f912403007af671cf3c9122c3e50a0e Mon Sep 17 00:00:00 2001 From: Al Snow Date: Wed, 23 Oct 2013 10:29:20 -0400 Subject: [PATCH] Added simplecov gem code changes --- .gitignore | 3 ++- Gemfile | 2 ++ Gemfile.lock | 9 +++++++++ spec/spec_helper.rb | 7 ++++++- test/test_helper.rb | 5 +++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fef3086..c58b054 100755 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .elasticbeanstalk/ .DS_Store /public/data -*.png \ No newline at end of file +*.png +coverage \ No newline at end of file diff --git a/Gemfile b/Gemfile index c3836db..131581f 100755 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,8 @@ end gem 'gauntlt' +gem 'simplecov', '0.8.0.pre2', :require => false, :group => :test + group :development, :test do gem 'launchy' gem 'capybara' diff --git a/Gemfile.lock b/Gemfile.lock index 92d0f04..1d59a8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,6 +82,7 @@ GEM database_cleaner (1.0.1) debug_inspector (0.0.2) diff-lcs (1.2.4) + docile (1.1.0) dotenv (0.9.0) em-websocket (0.5.0) eventmachine (>= 0.12.9) @@ -139,6 +140,7 @@ GEM celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) + lockfile (2.1.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) @@ -218,6 +220,12 @@ GEM sass (>= 3.1.10) tilt (~> 1.3) sexp_processor (4.4.0) + simplecov (0.8.0.pre2) + docile (~> 1.1.0) + lockfile (>= 2.1.0) + multi_json + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) slim (2.0.1) temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) @@ -285,6 +293,7 @@ DEPENDENCIES rb-fsevent rspec-rails sass-rails + simplecov (= 0.8.0.pre2) sqlite3 therubyracer travis-lint diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 417153f..e025086 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,10 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' + +# To use simplecov, do this: COVERAGE=true rake +require 'simplecov' +SimpleCov.start if ENV["COVERAGE"] + require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' @@ -50,4 +55,4 @@ end Capybara.javascript_driver = :poltergeist -DatabaseCleaner.strategy = :truncation \ No newline at end of file +DatabaseCleaner.strategy = :truncation diff --git a/test/test_helper.rb b/test/test_helper.rb index 8bf1192..b757019 100755 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,9 @@ ENV["RAILS_ENV"] = "test" + +# To use simplecov, do this: COVERAGE=true rake +require 'simplecov' +SimpleCov.start if ENV["COVERAGE"] + require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'