Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Add simplecov for coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroPointEnergy committed May 4, 2018
1 parent 8a68745 commit 8c20e70
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
# Ignore Ruby selection tools
/.rvmrc
/.rbenv

# Ignore coverage report results
/coverage
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ group :development, :test do
gem 'nokogiri'
gem 'rails-controller-testing'
gem 'listen'
gem 'simplecov'
gem 'simplecov-console'
end

group :postgresql do
Expand Down
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
ansi (1.5.0)
arel (9.0.0)
bindex (0.5.0)
bootsnap (1.3.0)
Expand All @@ -56,6 +57,7 @@ GEM
activerecord (>= 3.0, < 5.3)
delayed_job (>= 3.0, < 5)
diff-lcs (1.3)
docile (1.3.0)
erubi (1.7.1)
erubis (2.7.0)
eventmachine (1.2.6)
Expand All @@ -80,6 +82,7 @@ GEM
has_scope (0.7.2)
actionpack (>= 4.1)
activesupport (>= 4.1)
hirb (0.7.3)
html2haml (2.2.0)
erubis (~> 2.7.0)
haml (>= 4.0, < 6)
Expand All @@ -98,6 +101,7 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (2.1.0)
json_pure (2.1.0)
libv8 (3.16.14.19)
listen (3.1.5)
Expand Down Expand Up @@ -209,6 +213,15 @@ GEM
sexp_processor (4.11.0)
shoulda-matchers (3.1.2)
activesupport (>= 4.0.0)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-console (0.4.2)
ansi
hirb
simplecov
simplecov-html (0.10.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand Down Expand Up @@ -276,6 +289,8 @@ DEPENDENCIES
safe_yaml
sass-rails
shoulda-matchers
simplecov
simplecov-console
sqlite3
therubyracer
thin
Expand Down
15 changes: 15 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
$LOAD_PATH.push File.dirname(__FILE__)

# Start collecting data for test coverage report
require 'simplecov'
require 'simplecov-console'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console,
])
SimpleCov.start 'rails' do

add_filter '/spec/'
add_filter '/.bundle/'
add_filter '/vendor/'
add_group 'Tasks', "lib/tasks"
end

# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] = "test"
Expand Down

0 comments on commit 8c20e70

Please sign in to comment.