tailor 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -3
  3. data/Gemfile.lock +39 -31
  4. data/History.md +220 -207
  5. data/README.md +58 -45
  6. data/features/step_definitions/indentation_steps.rb +1 -1
  7. data/lib/tailor/reporter.rb +19 -7
  8. data/lib/tailor/rulers/spaces_before_lbrace_ruler.rb +0 -1
  9. data/lib/tailor/rulers/spaces_before_rbrace_ruler.rb +0 -1
  10. data/lib/tailor/rulers/spaces_in_empty_braces_ruler.rb +0 -1
  11. data/lib/tailor/version.rb +1 -1
  12. data/spec/functional/conditional_parentheses_spec.rb +1 -1
  13. data/spec/functional/conditional_spacing_spec.rb +1 -1
  14. data/spec/functional/configuration_spec.rb +61 -52
  15. data/spec/functional/horizontal_spacing/braces_spec.rb +134 -134
  16. data/spec/functional/horizontal_spacing/brackets_spec.rb +34 -36
  17. data/spec/functional/horizontal_spacing/comma_spacing_spec.rb +25 -27
  18. data/spec/functional/horizontal_spacing/hard_tabs_spec.rb +42 -42
  19. data/spec/functional/horizontal_spacing/long_lines_spec.rb +15 -17
  20. data/spec/functional/horizontal_spacing/long_methods_spec.rb +4 -4
  21. data/spec/functional/horizontal_spacing/parens_spec.rb +45 -45
  22. data/spec/functional/horizontal_spacing/trailing_whitespace_spec.rb +7 -8
  23. data/spec/functional/horizontal_spacing_spec.rb +10 -11
  24. data/spec/functional/indentation_spacing/argument_alignment_spec.rb +33 -62
  25. data/spec/functional/indentation_spacing/bad_indentation_spec.rb +176 -179
  26. data/spec/functional/indentation_spacing_spec.rb +13 -14
  27. data/spec/functional/naming/camel_case_methods_spec.rb +4 -6
  28. data/spec/functional/naming/screaming_snake_case_classes_spec.rb +28 -31
  29. data/spec/functional/naming_spec.rb +3 -3
  30. data/spec/functional/rake_task_spec.rb +9 -28
  31. data/spec/functional/string_interpolation_spec.rb +1 -1
  32. data/spec/functional/string_quoting_spec.rb +1 -1
  33. data/spec/functional/vertical_spacing/class_length_spec.rb +4 -6
  34. data/spec/functional/vertical_spacing/method_length_spec.rb +15 -17
  35. data/spec/functional/vertical_spacing_spec.rb +3 -3
  36. data/spec/spec_helper.rb +2 -0
  37. data/spec/support/argument_alignment_cases.rb +32 -32
  38. data/spec/support/conditional_parentheses_cases.rb +26 -26
  39. data/spec/support/good_indentation_cases.rb +205 -205
  40. data/spec/support/horizontal_spacing_cases.rb +53 -54
  41. data/spec/support/line_indentation_cases.rb +20 -20
  42. data/spec/support/naming_cases.rb +12 -12
  43. data/spec/support/string_interpolation_cases.rb +17 -17
  44. data/spec/support/string_quoting_cases.rb +12 -12
  45. data/spec/support/vertical_spacing_cases.rb +8 -8
  46. data/spec/unit/tailor/cli/options_spec.rb +20 -14
  47. data/spec/unit/tailor/cli_spec.rb +29 -43
  48. data/spec/unit/tailor/composite_observable_spec.rb +1 -1
  49. data/spec/unit/tailor/configuration/file_set_spec.rb +10 -11
  50. data/spec/unit/tailor/configuration/style_spec.rb +41 -42
  51. data/spec/unit/tailor/configuration_spec.rb +14 -12
  52. data/spec/unit/tailor/formatter_spec.rb +3 -3
  53. data/spec/unit/tailor/formatters/yaml_spec.rb +12 -13
  54. data/spec/unit/tailor/lexed_line_spec.rb +67 -69
  55. data/spec/unit/tailor/lexer/token_spec.rb +7 -7
  56. data/spec/unit/tailor/lexer_spec.rb +24 -24
  57. data/spec/unit/tailor/problem_spec.rb +12 -12
  58. data/spec/unit/tailor/reporter_spec.rb +8 -9
  59. data/spec/unit/tailor/ruler_spec.rb +10 -10
  60. data/spec/unit/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb +90 -86
  61. data/spec/unit/tailor/rulers/indentation_spaces_ruler_spec.rb +13 -13
  62. data/spec/unit/tailor/rulers/spaces_after_comma_ruler_spec.rb +4 -4
  63. data/spec/unit/tailor/rulers/spaces_after_lbrace_ruler_spec.rb +19 -19
  64. data/spec/unit/tailor/rulers/spaces_before_lbrace_ruler_spec.rb +6 -6
  65. data/spec/unit/tailor/rulers/spaces_before_rbrace_ruler_spec.rb +6 -6
  66. data/spec/unit/tailor/rulers_spec.rb +1 -1
  67. data/spec/unit/tailor/version_spec.rb +1 -2
  68. data/spec/unit/tailor_spec.rb +2 -2
  69. data/tailor.gemspec +3 -3
  70. metadata +20 -6
@@ -3,21 +3,20 @@ require_relative '../../support/horizontal_spacing_cases'
3
3
  require 'tailor/critic'
4
4
  require 'tailor/configuration/style'
5
5
 
6
-
7
6
  TRAILING_WHITESPACE = {}
8
- TRAILING_WHITESPACE['empty_line_with_spaces'] = %Q{ }
9
- TRAILING_WHITESPACE['empty_line_with_spaces_in_method'] = %Q{def thing
7
+ TRAILING_WHITESPACE['empty_line_with_spaces'] = %( )
8
+ TRAILING_WHITESPACE['empty_line_with_spaces_in_method'] = %(def thing
10
9
 
11
10
  puts 'something'
12
- end}
11
+ end)
13
12
 
14
- TRAILING_WHITESPACE['trailing_spaces_on_def'] = %Q{def thing
13
+ TRAILING_WHITESPACE['trailing_spaces_on_def'] = %(def thing
15
14
  puts 'something'
16
- end}
15
+ end)
17
16
 
18
17
  describe 'Trailing whitespace detection' do
19
18
  before do
20
- Tailor::Logger.stub(:log)
19
+ allow(Tailor::Logger).to receive(:log)
21
20
  FakeFS.activate!
22
21
  File.open(file_name, 'w') { |f| f.write contents }
23
22
  critic.check_file(file_name, style.to_hash)
@@ -27,7 +26,7 @@ describe 'Trailing whitespace detection' do
27
26
  Tailor::Critic.new
28
27
  end
29
28
 
30
- let(:contents) { TRAILING_WHITESPACE[file_name]}
29
+ let(:contents) { TRAILING_WHITESPACE[file_name] }
31
30
 
32
31
  let(:style) do
33
32
  style = Tailor::Configuration::Style.new
@@ -5,7 +5,7 @@ require 'tailor/configuration/style'
5
5
 
6
6
  describe 'Horizontal Space problem detection' do
7
7
  before do
8
- Tailor::Logger.stub(:log)
8
+ allow(Tailor::Logger).to receive(:log)
9
9
  FakeFS.activate!
10
10
  end
11
11
 
@@ -27,9 +27,9 @@ describe 'Horizontal Space problem detection' do
27
27
  File.open(file_name, 'w') { |f| f.write contents }
28
28
  end
29
29
 
30
- it 'should be OK' do
30
+ it 'is OK' do
31
31
  critic.check_file(file_name, style.to_hash)
32
- critic.problems.should == { file_name => [] }
32
+ expect(critic.problems).to eq(file_name => [])
33
33
  end
34
34
  end
35
35
 
@@ -43,31 +43,31 @@ describe 'Horizontal Space problem detection' do
43
43
 
44
44
  context 'no problems' do
45
45
  let(:contents) do
46
- %Q{execute 'myscript' do
46
+ %(execute 'myscript' do
47
47
  command \\
48
48
  '/some/line/that/is/not/over/eighty/chars.sh'
49
49
  only_if { something }
50
- end}
50
+ end)
51
51
  end
52
52
 
53
53
  it 'is OK' do
54
54
  critic.check_file(file_name, style.to_hash)
55
- critic.problems.should == { file_name => [] }
55
+ expect(critic.problems).to eq(file_name => [])
56
56
  end
57
57
  end
58
58
 
59
59
  context 'line after backslash is too long' do
60
60
  let(:contents) do
61
- %Q{execute 'myscript' do
61
+ %(execute 'myscript' do
62
62
  command \\
63
63
  '#{'*' * 75}'
64
64
  only_if { something }
65
- end}
65
+ end)
66
66
  end
67
67
 
68
68
  it 'is OK' do
69
69
  critic.check_file(file_name, style.to_hash)
70
- critic.problems.should == {
70
+ expect(critic.problems).to eq(
71
71
  file_name => [
72
72
  {
73
73
  type: 'max_line_length',
@@ -76,8 +76,7 @@ end}
76
76
  message: 'Line is 81 chars long, but should be 80.',
77
77
  level: :error
78
78
  }
79
- ]
80
- }
79
+ ])
81
80
  end
82
81
  end
83
82
  end
@@ -4,19 +4,18 @@ require 'tailor/critic'
4
4
  require 'tailor/configuration/style'
5
5
 
6
6
  describe 'Argument alignment' do
7
-
8
7
  def file_name
9
8
  self.class.description
10
9
  end
11
10
 
12
11
  def contents
13
12
  ARG_INDENT[file_name] || begin
14
- raise "Example not found: #{file_name}"
13
+ fail "Example not found: #{file_name}"
15
14
  end
16
15
  end
17
16
 
18
17
  before do
19
- Tailor::Logger.stub(:log)
18
+ allow(Tailor::Logger).to receive(:log)
20
19
  FakeFS.activate!
21
20
  FileUtils.touch file_name
22
21
  File.open(file_name, 'w') { |f| f.write contents }
@@ -32,7 +31,6 @@ describe 'Argument alignment' do
32
31
  end
33
32
 
34
33
  context :def_no_arguments do
35
-
36
34
  it 'does not warn when argument alignment is not specified' do
37
35
  critic.check_file(file_name, style.to_hash)
38
36
  expect(critic.problems[file_name]).to be_empty
@@ -49,11 +47,9 @@ describe 'Argument alignment' do
49
47
  critic.check_file(file_name, style.to_hash)
50
48
  expect(critic.problems[file_name]).to be_empty
51
49
  end
52
-
53
50
  end
54
51
 
55
52
  context :def_arguments_fit_on_one_line do
56
-
57
53
  it 'does not warn when argument alignment is not specified' do
58
54
  critic.check_file(file_name, style.to_hash)
59
55
  expect(critic.problems[file_name]).to be_empty
@@ -70,18 +66,16 @@ describe 'Argument alignment' do
70
66
  critic.check_file(file_name, style.to_hash)
71
67
  expect(critic.problems[file_name]).to be_empty
72
68
  end
73
-
74
69
  end
75
70
 
76
71
  context :def_arguments_aligned do
77
-
78
72
  it 'warns when argument alignment is not specified' do
79
73
  critic.check_file(file_name, style.to_hash)
80
74
  expect(critic.problems[file_name]).to eql [{
81
75
  type: 'indentation_spaces',
82
76
  line: 2,
83
77
  column: 14,
84
- message: "Line is indented to column 14, but should be at 2.",
78
+ message: 'Line is indented to column 14, but should be at 2.',
85
79
  level: :error
86
80
  }]
87
81
  end
@@ -93,7 +87,7 @@ describe 'Argument alignment' do
93
87
  type: 'indentation_spaces',
94
88
  line: 2,
95
89
  column: 14,
96
- message: "Line is indented to column 14, but should be at 2.",
90
+ message: 'Line is indented to column 14, but should be at 2.',
97
91
  level: :error
98
92
  }]
99
93
  end
@@ -103,11 +97,9 @@ describe 'Argument alignment' do
103
97
  critic.check_file(file_name, style.to_hash)
104
98
  expect(critic.problems[file_name]).to be_empty
105
99
  end
106
-
107
100
  end
108
101
 
109
102
  context :def_arguments_indented do
110
-
111
103
  it 'does not warn when argument alignment is not specified' do
112
104
  critic.check_file(file_name, style.to_hash)
113
105
  expect(critic.problems[file_name]).to be_empty
@@ -126,15 +118,13 @@ describe 'Argument alignment' do
126
118
  type: 'indentation_spaces',
127
119
  line: 2,
128
120
  column: 2,
129
- message: "Line is indented to column 2, but should be at 14.",
121
+ message: 'Line is indented to column 2, but should be at 14.',
130
122
  level: :error
131
123
  }]
132
124
  end
133
-
134
125
  end
135
126
 
136
127
  context :call_arguments_fit_on_one_line do
137
-
138
128
  it 'does not warn when argument alignment is not specified' do
139
129
  critic.check_file(file_name, style.to_hash)
140
130
  expect(critic.problems[file_name]).to be_empty
@@ -151,11 +141,9 @@ describe 'Argument alignment' do
151
141
  critic.check_file(file_name, style.to_hash)
152
142
  expect(critic.problems[file_name]).to be_empty
153
143
  end
154
-
155
144
  end
156
145
 
157
146
  context :call_no_arguments do
158
-
159
147
  it 'does not warn when argument alignment is not specified' do
160
148
  critic.check_file(file_name, style.to_hash)
161
149
  expect(critic.problems[file_name]).to be_empty
@@ -172,18 +160,16 @@ describe 'Argument alignment' do
172
160
  critic.check_file(file_name, style.to_hash)
173
161
  expect(critic.problems[file_name]).to be_empty
174
162
  end
175
-
176
163
  end
177
164
 
178
165
  context :call_arguments_aligned do
179
-
180
166
  it 'warns when argument alignment is not specified' do
181
167
  critic.check_file(file_name, style.to_hash)
182
168
  expect(critic.problems[file_name]).to eql [{
183
169
  type: 'indentation_spaces',
184
170
  line: 2,
185
171
  column: 49,
186
- message: "Line is indented to column 49, but should be at 2.",
172
+ message: 'Line is indented to column 49, but should be at 2.',
187
173
  level: :error
188
174
  }]
189
175
  end
@@ -195,7 +181,7 @@ describe 'Argument alignment' do
195
181
  type: 'indentation_spaces',
196
182
  line: 2,
197
183
  column: 49,
198
- message: "Line is indented to column 49, but should be at 2.",
184
+ message: 'Line is indented to column 49, but should be at 2.',
199
185
  level: :error
200
186
  }]
201
187
  end
@@ -205,18 +191,16 @@ describe 'Argument alignment' do
205
191
  critic.check_file(file_name, style.to_hash)
206
192
  expect(critic.problems[file_name]).to be_empty
207
193
  end
208
-
209
194
  end
210
195
 
211
196
  context :call_arguments_aligned_args_are_integer_literals do
212
-
213
197
  it 'warns when argument alignment is not specified' do
214
198
  critic.check_file(file_name, style.to_hash)
215
199
  expect(critic.problems[file_name]).to eql [{
216
200
  type: 'indentation_spaces',
217
201
  line: 2,
218
202
  column: 49,
219
- message: "Line is indented to column 49, but should be at 2.",
203
+ message: 'Line is indented to column 49, but should be at 2.',
220
204
  level: :error
221
205
  }]
222
206
  end
@@ -228,7 +212,7 @@ describe 'Argument alignment' do
228
212
  type: 'indentation_spaces',
229
213
  line: 2,
230
214
  column: 49,
231
- message: "Line is indented to column 49, but should be at 2.",
215
+ message: 'Line is indented to column 49, but should be at 2.',
232
216
  level: :error
233
217
  }]
234
218
  end
@@ -238,18 +222,16 @@ describe 'Argument alignment' do
238
222
  critic.check_file(file_name, style.to_hash)
239
223
  expect(critic.problems[file_name]).to be_empty
240
224
  end
241
-
242
225
  end
243
226
 
244
227
  context :call_arguments_aligned_args_are_string_literals do
245
-
246
228
  it 'warns when argument alignment is not specified' do
247
229
  critic.check_file(file_name, style.to_hash)
248
230
  expect(critic.problems[file_name]).to eql [{
249
231
  type: 'indentation_spaces',
250
232
  line: 2,
251
233
  column: 49,
252
- message: "Line is indented to column 49, but should be at 2.",
234
+ message: 'Line is indented to column 49, but should be at 2.',
253
235
  level: :error
254
236
  }]
255
237
  end
@@ -261,7 +243,7 @@ describe 'Argument alignment' do
261
243
  type: 'indentation_spaces',
262
244
  line: 2,
263
245
  column: 49,
264
- message: "Line is indented to column 49, but should be at 2.",
246
+ message: 'Line is indented to column 49, but should be at 2.',
265
247
  level: :error
266
248
  }]
267
249
  end
@@ -271,11 +253,9 @@ describe 'Argument alignment' do
271
253
  critic.check_file(file_name, style.to_hash)
272
254
  expect(critic.problems[file_name]).to be_empty
273
255
  end
274
-
275
256
  end
276
257
 
277
258
  context :call_arguments_aligned_multiple_lines do
278
-
279
259
  it 'warns when argument alignment is not specified' do
280
260
  critic.check_file(file_name, style.to_hash)
281
261
  expect(critic.problems[file_name]).to eql [
@@ -283,14 +263,14 @@ describe 'Argument alignment' do
283
263
  type: 'indentation_spaces',
284
264
  line: 2,
285
265
  column: 49,
286
- message: "Line is indented to column 49, but should be at 2.",
266
+ message: 'Line is indented to column 49, but should be at 2.',
287
267
  level: :error
288
268
  },
289
269
  {
290
270
  type: 'indentation_spaces',
291
271
  line: 3,
292
272
  column: 49,
293
- message: "Line is indented to column 49, but should be at 2.",
273
+ message: 'Line is indented to column 49, but should be at 2.',
294
274
  level: :error
295
275
  }
296
276
  ]
@@ -304,14 +284,14 @@ describe 'Argument alignment' do
304
284
  type: 'indentation_spaces',
305
285
  line: 2,
306
286
  column: 49,
307
- message: "Line is indented to column 49, but should be at 2.",
287
+ message: 'Line is indented to column 49, but should be at 2.',
308
288
  level: :error
309
289
  },
310
290
  {
311
291
  type: 'indentation_spaces',
312
292
  line: 3,
313
293
  column: 49,
314
- message: "Line is indented to column 49, but should be at 2.",
294
+ message: 'Line is indented to column 49, but should be at 2.',
315
295
  level: :error
316
296
  }
317
297
  ]
@@ -322,7 +302,6 @@ describe 'Argument alignment' do
322
302
  critic.check_file(file_name, style.to_hash)
323
303
  expect(critic.problems[file_name]).to be_empty
324
304
  end
325
-
326
305
  end
327
306
 
328
307
  context :call_arguments_aligned_args_have_parens do
@@ -333,7 +312,7 @@ describe 'Argument alignment' do
333
312
  type: 'indentation_spaces',
334
313
  line: 2,
335
314
  column: 49,
336
- message: "Line is indented to column 49, but should be at 2.",
315
+ message: 'Line is indented to column 49, but should be at 2.',
337
316
  level: :error
338
317
  }
339
318
  ]
@@ -347,7 +326,7 @@ describe 'Argument alignment' do
347
326
  type: 'indentation_spaces',
348
327
  line: 2,
349
328
  column: 49,
350
- message: "Line is indented to column 49, but should be at 2.",
329
+ message: 'Line is indented to column 49, but should be at 2.',
351
330
  level: :error
352
331
  }
353
332
  ]
@@ -358,19 +337,16 @@ describe 'Argument alignment' do
358
337
  critic.check_file(file_name, style.to_hash)
359
338
  expect(critic.problems[file_name]).to be_empty
360
339
  end
361
-
362
-
363
340
  end
364
341
 
365
342
  context :call_arguments_aligned_no_parens do
366
-
367
343
  it 'warns when argument alignment is not specified' do
368
344
  critic.check_file(file_name, style.to_hash)
369
345
  expect(critic.problems[file_name]).to eql [{
370
346
  type: 'indentation_spaces',
371
347
  line: 2,
372
348
  column: 49,
373
- message: "Line is indented to column 49, but should be at 2.",
349
+ message: 'Line is indented to column 49, but should be at 2.',
374
350
  level: :error
375
351
  }]
376
352
  end
@@ -382,7 +358,7 @@ describe 'Argument alignment' do
382
358
  type: 'indentation_spaces',
383
359
  line: 2,
384
360
  column: 49,
385
- message: "Line is indented to column 49, but should be at 2.",
361
+ message: 'Line is indented to column 49, but should be at 2.',
386
362
  level: :error
387
363
  }]
388
364
  end
@@ -392,11 +368,9 @@ describe 'Argument alignment' do
392
368
  critic.check_file(file_name, style.to_hash)
393
369
  expect(critic.problems[file_name]).to be_empty
394
370
  end
395
-
396
371
  end
397
372
 
398
373
  context :call_arguments_indented do
399
-
400
374
  it 'does not warn when argument alignment is not specified' do
401
375
  critic.check_file(file_name, style.to_hash)
402
376
  expect(critic.problems[file_name]).to be_empty
@@ -415,15 +389,13 @@ describe 'Argument alignment' do
415
389
  type: 'indentation_spaces',
416
390
  line: 2,
417
391
  column: 2,
418
- message: "Line is indented to column 2, but should be at 49.",
392
+ message: 'Line is indented to column 2, but should be at 49.',
419
393
  level: :error
420
394
  }]
421
395
  end
422
-
423
396
  end
424
397
 
425
398
  context :call_arguments_indented_separate_line do
426
-
427
399
  it 'does not warn when argument alignment is not specified' do
428
400
  critic.check_file(file_name, style.to_hash)
429
401
  expect(critic.problems[file_name]).to be_empty
@@ -440,11 +412,9 @@ describe 'Argument alignment' do
440
412
  critic.check_file(file_name, style.to_hash)
441
413
  expect(critic.problems[file_name]).to be_empty
442
414
  end
443
-
444
415
  end
445
416
 
446
417
  context :call_arguments_on_next_line do
447
-
448
418
  it 'does not warn when argument alignment is not specified' do
449
419
  style.indentation_spaces 2, level: :error, line_continuations: true
450
420
  critic.check_file(file_name, style.to_hash)
@@ -452,21 +422,21 @@ describe 'Argument alignment' do
452
422
  end
453
423
 
454
424
  it 'does not warn when argument alignment is disabled' do
455
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: :off
425
+ style.indentation_spaces 2, level: :error, line_continuations: true,
426
+ argument_alignment: :off
456
427
  critic.check_file(file_name, style.to_hash)
457
428
  expect(critic.problems[file_name]).to be_empty
458
429
  end
459
430
 
460
431
  it 'does not warn when argument alignment is enabled' do
461
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: true
432
+ style.indentation_spaces 2, level: :error, line_continuations: true,
433
+ argument_alignment: true
462
434
  critic.check_file(file_name, style.to_hash)
463
435
  expect(critic.problems[file_name]).to be_empty
464
436
  end
465
-
466
437
  end
467
438
 
468
439
  context :call_arguments_on_next_line_nested do
469
-
470
440
  it 'does not warn when argument alignment is not specified' do
471
441
  style.indentation_spaces 2, level: :error, line_continuations: true
472
442
  critic.check_file(file_name, style.to_hash)
@@ -474,20 +444,21 @@ describe 'Argument alignment' do
474
444
  end
475
445
 
476
446
  it 'does not warn when argument alignment is disabled' do
477
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: :off
447
+ style.indentation_spaces 2, level: :error, line_continuations: true,
448
+ argument_alignment: :off
478
449
  critic.check_file(file_name, style.to_hash)
479
450
  expect(critic.problems[file_name]).to be_empty
480
451
  end
481
452
 
482
453
  it 'does not warn when argument alignment is enabled' do
483
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: true
454
+ style.indentation_spaces 2, level: :error, line_continuations: true,
455
+ argument_alignment: true
484
456
  critic.check_file(file_name, style.to_hash)
485
457
  expect(critic.problems[file_name]).to be_empty
486
458
  end
487
-
488
459
  end
489
- context :call_arguments_on_next_line_multiple do
490
460
 
461
+ context :call_arguments_on_next_line_multiple do
491
462
  it 'does not warn when argument alignment is not specified' do
492
463
  style.indentation_spaces 2, level: :error, line_continuations: true
493
464
  critic.check_file(file_name, style.to_hash)
@@ -495,17 +466,17 @@ describe 'Argument alignment' do
495
466
  end
496
467
 
497
468
  it 'does not warn when argument alignment is disabled' do
498
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: :off
469
+ style.indentation_spaces 2, level: :error, line_continuations: true,
470
+ argument_alignment: :off
499
471
  critic.check_file(file_name, style.to_hash)
500
472
  expect(critic.problems[file_name]).to be_empty
501
473
  end
502
474
 
503
475
  it 'does not warn when argument alignment is enabled' do
504
- style.indentation_spaces 2, level: :error, line_continuations: true, argument_alignment: true
476
+ style.indentation_spaces 2, level: :error, line_continuations: true,
477
+ argument_alignment: true
505
478
  critic.check_file(file_name, style.to_hash)
506
479
  expect(critic.problems[file_name]).to be_empty
507
480
  end
508
-
509
481
  end
510
-
511
482
  end