diff --git a/.gitignore b/.gitignore index 005a570..076a495 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ public/system .sass-cache/ .envrc config/database.yml +coverage diff --git a/Gemfile b/Gemfile index 09c6103..808bc52 100644 --- a/Gemfile +++ b/Gemfile @@ -55,6 +55,7 @@ group :test do gem 'database_cleaner' gem 'fivemat' gem 'capybara-screenshot' + gem 'simplecov' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 2b7c1fc..e92d015 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,6 +82,7 @@ GEM thread_safe (~> 0.1) warden (~> 1.2.3) diff-lcs (1.2.5) + docile (1.1.5) dragonfly (1.0.7) addressable (~> 2.3) multi_json (~> 1.0) @@ -266,6 +267,11 @@ GEM simple_form (3.1.0) actionpack (~> 4.0) activemodel (~> 4.0) + simplecov (0.9.1) + docile (~> 1.1.0) + multi_json (~> 1.0) + simplecov-html (~> 0.8.0) + simplecov-html (0.8.0) slop (3.6.0) slugtastic (1.2.1) sprockets (2.12.3) @@ -339,6 +345,7 @@ DEPENDENCIES sass-rails (~> 4.0.0) shoulda-matchers simple_form + simplecov slugtastic sqlite3 squeel diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7ec9007..a109ae7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,10 @@ require 'rspec/rails' require 'capybara/rspec' require 'capybara/poltergeist' +# For code coverage +require 'simplecov' +SimpleCov.start + # Use Poltergeist Capybara.javascript_driver = :poltergeist