diff --git a/.gitignore b/.gitignore index 48fb168..85cedcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,7 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. +/coverage /.bundle - -# Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep - -# Ignore Byebug command history file. .byebug_history diff --git a/.simplecov b/.simplecov new file mode 100644 index 0000000..82db613 --- /dev/null +++ b/.simplecov @@ -0,0 +1,6 @@ +SimpleCov.start 'rails' do + add_filter '/app/channels/' + add_filter '/app/mailers/' + add_filter '/app/helpers/' + add_filter '/app/jobs/' +end diff --git a/Gemfile b/Gemfile index 347b15d..006ba3f 100644 --- a/Gemfile +++ b/Gemfile @@ -40,6 +40,7 @@ group :test do gem 'launchy' gem 'selenium-webdriver' gem 'shoulda-matchers' + gem 'simplecov', require: false end gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Gemfile.lock b/Gemfile.lock index 871d499..ba769ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,6 +75,7 @@ GEM descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.3) + docile (1.1.5) equalizer (0.0.11) erubis (2.7.0) execjs (2.7.0) @@ -112,6 +113,7 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) + json (2.0.3) launchy (2.4.3) addressable (~> 2.3) listen (3.0.8) @@ -224,6 +226,11 @@ GEM shellany (0.0.1) shoulda-matchers (3.1.1) activesupport (>= 4.0.0) + simplecov (0.12.0) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) slim (3.0.7) temple (~> 0.7.6) tilt (>= 1.3.3, < 2.1) @@ -298,6 +305,7 @@ DEPENDENCIES sass-rails (~> 5.0) selenium-webdriver shoulda-matchers + simplecov slim-rails spring spring-watcher-listen (~> 2.0.0) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 6df5679..d7c2634 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -7,7 +7,7 @@ require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! - +require 'simplecov' Dir[Rails.root.join('spec', 'support**', '*.rb')].each { |f| require f } ActiveRecord::Migration.maintain_test_schema!