Skip to content

Commit 79f77c9

Browse files
Rails model, controller, and route tests
1 parent 8ca0a4b commit 79f77c9

File tree

10 files changed

+547
-0
lines changed

10 files changed

+547
-0
lines changed

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ Metrics/MethodLength:
2828

2929
Metrics/BlockLength:
3030
Max: 105
31+
ExcludedMethods: [describe]
3132

3233
Style/StringLiterals:
3334
EnforcedStyle: double_quotes
3435

3536
Style/Documentation:
3637
Enabled: false
38+
39+
Style/BracesAroundHashParameters:
40+
Exclude:
41+
- spec/controllers/**/*

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ group :development, :test do
9292
end
9393

9494
group :test do
95+
gem "airborne"
96+
gem "api_matchers"
9597
gem "capybara", "2.13.0"
9698
gem "capybara-screenshot"
9799
gem "capybara-webkit", "1.14.0"
@@ -101,6 +103,7 @@ group :test do
101103
gem "generator_spec"
102104
gem "launchy"
103105
gem "poltergeist"
106+
gem "rails-controller-testing"
104107
gem "rails_best_practices"
105108
gem "rspec-rails", "3.6.1"
106109
gem "rspec-retry"

Gemfile.lock

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ GEM
4040
tzinfo (~> 1.1)
4141
addressable (2.5.2)
4242
public_suffix (>= 2.0.2, < 4.0)
43+
airborne (0.2.13)
44+
activesupport
45+
rack
46+
rack-test (~> 0.6, >= 0.6.2)
47+
rest-client (>= 1.7.3, < 3.0)
48+
rspec (~> 3.1)
49+
api_matchers (0.6.2)
50+
activesupport (>= 3.2.5)
51+
nokogiri (>= 1.5.2)
52+
rspec (>= 3.1)
4353
archive-zip (0.7.0)
4454
io-like (~> 0.3.0)
4555
arel (8.0.0)
@@ -98,6 +108,8 @@ GEM
98108
debug_inspector (0.0.3)
99109
diff-lcs (1.3)
100110
docile (1.1.5)
111+
domain_name (0.5.20170404)
112+
unf (>= 0.0.5, < 1.0.0)
101113
erubi (1.7.0)
102114
erubis (2.7.0)
103115
execjs (2.7.0)
@@ -114,6 +126,8 @@ GEM
114126
railties (>= 3.0.0)
115127
globalid (0.4.1)
116128
activesupport (>= 4.2.0)
129+
http-cookie (1.0.3)
130+
domain_name (~> 0.5)
117131
i18n (0.9.1)
118132
concurrent-ruby (~> 1.0)
119133
interception (0.5)
@@ -144,6 +158,7 @@ GEM
144158
libv8 (~> 5.9)
145159
minitest (5.10.3)
146160
multi_json (1.12.2)
161+
netrc (0.11.0)
147162
nio4r (2.1.0)
148163
nokogiri (1.8.1)
149164
mini_portile2 (~> 2.3.0)
@@ -192,6 +207,10 @@ GEM
192207
bundler (>= 1.3.0)
193208
railties (= 5.1.4)
194209
sprockets-rails (>= 2.0.0)
210+
rails-controller-testing (1.0.2)
211+
actionpack (~> 5.x, >= 5.0.1)
212+
actionview (~> 5.x, >= 5.0.1)
213+
activesupport (~> 5.x)
195214
rails-dom-testing (2.0.3)
196215
activesupport (>= 4.2.0)
197216
nokogiri (>= 1.6)
@@ -226,6 +245,14 @@ GEM
226245
rainbow (~> 2.2)
227246
redis (3.3.3)
228247
require_all (1.4.0)
248+
rest-client (2.0.2)
249+
http-cookie (>= 1.0.2, < 2.0)
250+
mime-types (>= 1.16, < 4.0)
251+
netrc (~> 0.8)
252+
rspec (3.6.0)
253+
rspec-core (~> 3.6.0)
254+
rspec-expectations (~> 3.6.0)
255+
rspec-mocks (~> 3.6.0)
229256
rspec-core (3.6.0)
230257
rspec-support (~> 3.6.0)
231258
rspec-expectations (3.6.0)
@@ -306,6 +333,9 @@ GEM
306333
thread_safe (~> 0.1)
307334
uglifier (3.2.0)
308335
execjs (>= 0.3.0, < 3)
336+
unf (0.1.4)
337+
unf_ext
338+
unf_ext (0.0.7.4)
309339
unicode-display_width (1.3.0)
310340
web-console (3.5.1)
311341
actionview (>= 5.0)
@@ -327,6 +357,8 @@ PLATFORMS
327357
ruby
328358

329359
DEPENDENCIES
360+
airborne
361+
api_matchers
330362
autoprefixer-rails
331363
awesome_print
332364
brakeman
@@ -355,6 +387,7 @@ DEPENDENCIES
355387
pry-stack_explorer
356388
puma
357389
rails (~> 5)
390+
rails-controller-testing
358391
rails-html-sanitizer
359392
rails_best_practices
360393
rainbow

0 commit comments

Comments
 (0)