Skip to content

Commit e95e27d

Browse files
committed
Merge pull request #158 from PragTob/trekr5-master
Simplecov additions by @trekr5
2 parents 65d3c27 + 273a1a7 commit e95e27d

5 files changed

Lines changed: 28 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ tmp/
88
*.swp
99
.redcar
1010
bin/
11+
coverage

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,21 @@ end
4242
group :development, :test do
4343
gem 'fabrication'
4444
gem 'rspec-rails'
45+
gem 'capybara'
4546
gem 'cucumber-rails', require: false
4647
gem "faker"
4748
gem 'pry'
4849
gem 'sqlite3'
50+
51+
4952
end
5053

5154
group :production do
5255
gem 'pg' # ugh heroku
5356
end
5457

5558
group :test do
59+
gem "simplecov", :require => false
5660
gem "mocha"
5761
gem "database_cleaner"
5862
gem "launchy"

Gemfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ GEM
202202
ffi (~> 1.0.9)
203203
multi_json (~> 1.0.4)
204204
rubyzip
205+
simplecov (0.7.1)
206+
multi_json (~> 1.0)
207+
simplecov-html (~> 0.7.1)
208+
simplecov-html (0.7.1)
205209
slop (2.4.3)
206210
sprockets (2.0.4)
207211
hike (~> 1.2)
@@ -234,6 +238,7 @@ PLATFORMS
234238
DEPENDENCIES
235239
bson_ext
236240
cancan
241+
capybara
237242
coffee-rails (~> 3.1.0)
238243
cucumber-rails
239244
database_cleaner
@@ -257,6 +262,7 @@ DEPENDENCIES
257262
sass-rails (~> 3.1.0)
258263
semantic_menu!
259264
simple_form!
265+
simplecov
260266
sqlite3
261267
uglifier
262268
unicorn

features/support/env.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# newer version of cucumber-rails. Consider adding your own code to a new file
44
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
55
# files.
6+
#
7+
8+
require 'simplecov'
9+
SimpleCov.start do
10+
add_filter '/spec/'
11+
add_filter '/config/'
12+
add_filter '/vendor/'
13+
end
614

715
require 'cucumber/rails'
816

spec/spec_helper.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
require 'simplecov'
2+
SimpleCov.start do
3+
add_filter '/config/'
4+
add_filter '/vendor/'
5+
add_filter '/features/'
6+
end
7+
18
ENV["RAILS_ENV"] ||= 'test'
29
require File.expand_path("../../config/environment", __FILE__)
310
require 'rspec/rails'
411
require 'database_cleaner'
12+
require 'capybara/rspec'
513

614
# Requires supporting ruby files with custom matchers and macros, etc,
715
# in spec/support/ and its subdirectories.
@@ -28,4 +36,5 @@
2836
config.before(:each) { reset_email }
2937

3038
config.include Devise::TestHelpers, :type => :controller
39+
config.include Capybara::DSL
3140
end

0 commit comments

Comments
 (0)