Skip to content

Commit 9b299f5

Browse files
committed
Add coveralls.io code coverage integration.
Add coverall gem to gemfile and bundle install to update Gemfile.lock Add require for coveralls to top of spec/rails_helper.rb. this must be at the top before any rails code loads. Add .coveralls.yml config file and set CI service_name to Codeship.
1 parent e123829 commit 9b299f5

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

.coveralls.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
service_name: codeship

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ client-bundle.js.map
2020
.env
2121
node_modules
2222
npm-debug.log
23+
/coverage
2324

2425
# Ignore bundle dependencies
2526
vendor/ruby

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ group :development, :test do
8080
end
8181

8282
group :test do
83+
gem "coveralls", require: false
8384
gem "rspec-rails"
8485
gem "capybara"
8586
gem "capybara-screenshot"

Gemfile.lock

+31
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,18 @@ GEM
8383
execjs
8484
coffee-script-source (1.9.1.1)
8585
columnize (0.9.0)
86+
coveralls (0.8.2)
87+
json (~> 1.8)
88+
rest-client (>= 1.6.8, < 2)
89+
simplecov (~> 0.10.0)
90+
term-ansicolor (~> 1.3)
91+
thor (~> 0.19.1)
8692
database_cleaner (1.4.1)
8793
debug_inspector (0.0.2)
8894
diff-lcs (1.2.5)
95+
docile (1.1.5)
96+
domain_name (0.5.24)
97+
unf (>= 0.0.5, < 1.0.0)
8998
erubis (2.7.0)
9099
es5-shim-rails (4.0.1)
91100
actionpack (>= 3.1)
@@ -104,6 +113,8 @@ GEM
104113
haml (4.0.6)
105114
tilt
106115
highline (1.6.21)
116+
http-cookie (1.0.2)
117+
domain_name (~> 0.5)
107118
i18n (0.7.0)
108119
jbuilder (2.3.1)
109120
activesupport (>= 3.0.0, < 5)
@@ -120,6 +131,7 @@ GEM
120131
mini_portile (0.6.2)
121132
minitest (5.7.0)
122133
multi_json (1.11.2)
134+
netrc (0.10.3)
123135
nokogiri (1.6.6.2)
124136
mini_portile (~> 0.6.0)
125137
parser (2.2.2.6)
@@ -171,6 +183,10 @@ GEM
171183
react_on_rails (0.1.1)
172184
execjs (~> 2.5)
173185
rails (~> 4.2)
186+
rest-client (1.8.0)
187+
http-cookie (>= 1.0.2, < 2.0)
188+
mime-types (>= 1.16, < 3.0)
189+
netrc (~> 0.7)
174190
rspec-core (3.3.2)
175191
rspec-support (~> 3.3.0)
176192
rspec-expectations (3.3.1)
@@ -217,6 +233,11 @@ GEM
217233
json (~> 1.7, >= 1.7.7)
218234
rdoc (~> 4.0)
219235
sexp_processor (4.6.0)
236+
simplecov (0.10.0)
237+
docile (~> 1.1.0)
238+
json (~> 1.8)
239+
simplecov-html (~> 0.10.0)
240+
simplecov-html (0.10.0)
220241
slop (3.6.0)
221242
spring (1.3.6)
222243
spring-commands-rspec (1.0.4)
@@ -228,17 +249,23 @@ GEM
228249
activesupport (>= 3.0)
229250
sprockets (>= 2.8, < 4.0)
230251
sqlite3 (1.3.10)
252+
term-ansicolor (1.3.2)
253+
tins (~> 1.0)
231254
terminal-table (1.5.2)
232255
thor (0.19.1)
233256
thread_safe (0.3.5)
234257
tilt (1.4.1)
258+
tins (1.6.0)
235259
turbolinks (2.5.3)
236260
coffee-rails
237261
tzinfo (1.2.2)
238262
thread_safe (~> 0.1)
239263
uglifier (2.7.1)
240264
execjs (>= 0.3.0)
241265
json (>= 1.8.0)
266+
unf (0.1.4)
267+
unf_ext
268+
unf_ext (0.0.7.1)
242269
unicorn (4.9.0)
243270
kgio (~> 2.6)
244271
rack
@@ -266,6 +293,7 @@ DEPENDENCIES
266293
capybara
267294
capybara-screenshot
268295
coffee-rails
296+
coveralls
269297
database_cleaner
270298
es5-shim-rails
271299
factory_girl_rails
@@ -293,3 +321,6 @@ DEPENDENCIES
293321
uglifier
294322
unicorn
295323
web-console
324+
325+
BUNDLED WITH
326+
1.10.6

spec/rails_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# This file is copied to spec/ when you run "rails generate rspec:install"
22
ENV["RAILS_ENV"] ||= "test"
3+
require "coveralls"
4+
Coveralls.wear!("rails") # must occur before any of your application code is required
35
require "spec_helper"
46
require File.expand_path("../../config/environment", __FILE__)
57
require "rspec/rails"

0 commit comments

Comments
 (0)