Skip to content

Commit c5e1177

Browse files
committed
Set up code coverage with simplecov
1 parent ae13bf1 commit c5e1177

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

source/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
# Ignore all logfiles and tempfiles.
1515
/log/*.log
1616
/tmp
17+
18+
# Code coverage
19+
coverage

source/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ gem 'sdoc', '~> 0.4.0', group: :doc
2626
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
2727
gem 'spring', group: :development
2828

29+
# Code coverage
30+
gem 'simplecov', require: false, group: :test
31+
2932
# Use ActiveModel has_secure_password
3033
# gem 'bcrypt', '~> 3.1.7'
3134

source/Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ GEM
3636
coffee-script-source
3737
execjs
3838
coffee-script-source (1.8.0)
39+
docile (1.1.5)
3940
erubis (2.7.0)
4041
execjs (2.2.1)
4142
hike (1.2.3)
@@ -82,6 +83,11 @@ GEM
8283
sdoc (0.4.1)
8384
json (~> 1.7, >= 1.7.7)
8485
rdoc (~> 4.0)
86+
simplecov (0.9.1)
87+
docile (~> 1.1.0)
88+
multi_json (~> 1.0)
89+
simplecov-html (~> 0.8.0)
90+
simplecov-html (0.8.0)
8591
spring (1.1.3)
8692
sprockets (2.11.0)
8793
hike (~> 1.2)
@@ -114,6 +120,7 @@ DEPENDENCIES
114120
rails (= 4.1.6)
115121
sass-rails (~> 4.0.3)
116122
sdoc (~> 0.4.0)
123+
simplecov
117124
spring
118125
sqlite3
119126
turbolinks

source/test/test_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
require 'simplecov'
2+
SimpleCov.start 'rails'
3+
14
ENV['RAILS_ENV'] ||= 'test'
25
require File.expand_path('../../config/environment', __FILE__)
36
require 'rails/test_help'

0 commit comments

Comments
 (0)