puppet-lint 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/lib/puppet-lint/lexer.rb +2 -2
  4. data/lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb +2 -2
  5. data/lib/puppet-lint/plugins/top_scope_facts/top_scope_facts.rb +4 -4
  6. data/lib/puppet-lint/version.rb +1 -1
  7. data/rubocop_baseline.yml +7 -0
  8. data/spec/spec_helper.rb +0 -1
  9. data/spec/unit/puppet-lint/checks_spec.rb +7 -2
  10. data/spec/unit/puppet-lint/ignore_overrides_spec.rb +6 -6
  11. data/spec/unit/puppet-lint/lexer_spec.rb +702 -699
  12. data/spec/unit/puppet-lint/plugins/check_classes/arrow_on_right_operand_line_spec.rb +5 -5
  13. data/spec/unit/puppet-lint/plugins/check_classes/autoloader_layout_spec.rb +8 -8
  14. data/spec/unit/puppet-lint/plugins/check_classes/class_inherits_from_params_class_spec.rb +2 -2
  15. data/spec/unit/puppet-lint/plugins/check_classes/code_on_top_scope_spec.rb +2 -1
  16. data/spec/unit/puppet-lint/plugins/check_classes/inherits_across_namespaces_spec.rb +3 -3
  17. data/spec/unit/puppet-lint/plugins/check_classes/name_contains_uppercase_spec.rb +3 -3
  18. data/spec/unit/puppet-lint/plugins/check_classes/names_containing_dash_spec.rb +3 -3
  19. data/spec/unit/puppet-lint/plugins/check_classes/nested_classes_or_defines_spec.rb +5 -5
  20. data/spec/unit/puppet-lint/plugins/check_classes/parameter_order_spec.rb +14 -14
  21. data/spec/unit/puppet-lint/plugins/check_classes/right_to_left_relationship_spec.rb +2 -2
  22. data/spec/unit/puppet-lint/plugins/check_classes/variable_scope_spec.rb +21 -21
  23. data/spec/unit/puppet-lint/plugins/check_comments/slash_comments_spec.rb +2 -2
  24. data/spec/unit/puppet-lint/plugins/check_comments/star_comments_spec.rb +4 -4
  25. data/spec/unit/puppet-lint/plugins/check_conditionals/case_without_default_spec.rb +6 -6
  26. data/spec/unit/puppet-lint/plugins/check_conditionals/selector_inside_resource_spec.rb +2 -2
  27. data/spec/unit/puppet-lint/plugins/check_documentation/documentation_spec.rb +5 -5
  28. data/spec/unit/puppet-lint/plugins/check_nodes/unquoted_node_name_spec.rb +11 -11
  29. data/spec/unit/puppet-lint/plugins/check_resources/duplicate_params_spec.rb +6 -6
  30. data/spec/unit/puppet-lint/plugins/check_resources/ensure_first_param_spec.rb +12 -12
  31. data/spec/unit/puppet-lint/plugins/check_resources/ensure_not_symlink_target_spec.rb +4 -4
  32. data/spec/unit/puppet-lint/plugins/check_resources/file_mode_spec.rb +22 -22
  33. data/spec/unit/puppet-lint/plugins/check_resources/unquoted_file_mode_spec.rb +8 -8
  34. data/spec/unit/puppet-lint/plugins/check_resources/unquoted_resource_title_spec.rb +13 -13
  35. data/spec/unit/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb +18 -18
  36. data/spec/unit/puppet-lint/plugins/check_strings/only_variable_string_spec.rb +6 -6
  37. data/spec/unit/puppet-lint/plugins/check_strings/puppet_url_without_modules_spec.rb +4 -4
  38. data/spec/unit/puppet-lint/plugins/check_strings/quoted_booleans_spec.rb +8 -8
  39. data/spec/unit/puppet-lint/plugins/check_strings/single_quote_string_with_variables_spec.rb +3 -3
  40. data/spec/unit/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb +7 -7
  41. data/spec/unit/puppet-lint/plugins/check_variables/variable_contains_dash_spec.rb +2 -2
  42. data/spec/unit/puppet-lint/plugins/check_variables/variable_is_lowercase_spec.rb +5 -5
  43. data/spec/unit/puppet-lint/plugins/check_whitespace/140chars_spec.rb +4 -4
  44. data/spec/unit/puppet-lint/plugins/check_whitespace/2sp_soft_tabs_spec.rb +1 -1
  45. data/spec/unit/puppet-lint/plugins/check_whitespace/80chars_spec.rb +4 -4
  46. data/spec/unit/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb +37 -37
  47. data/spec/unit/puppet-lint/plugins/check_whitespace/hard_tabs_spec.rb +2 -2
  48. data/spec/unit/puppet-lint/plugins/check_whitespace/trailing_whitespace_spec.rb +6 -6
  49. data/spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb +83 -75
  50. data/spec/unit/puppet-lint/plugins/top_scope_facts/top_scope_facts_spec.rb +19 -19
  51. metadata +6 -4
@@ -13,7 +13,7 @@ describe 'arrow_on_right_operand_line' do
13
13
  end
14
14
 
15
15
  it 'does not detect any problems' do
16
- expect(problems).to have(0).problems
16
+ expect(problems).to be_empty
17
17
  end
18
18
  end
19
19
 
@@ -26,7 +26,7 @@ describe 'arrow_on_right_operand_line' do
26
26
  end
27
27
 
28
28
  it 'detects a problem' do
29
- expect(problems).to have(1).problem
29
+ expect(problems.size).to eq(1)
30
30
  end
31
31
 
32
32
  it 'creates a warning' do
@@ -68,7 +68,7 @@ describe 'arrow_on_right_operand_line' do
68
68
  end
69
69
 
70
70
  it 'does not detect any problems' do
71
- expect(problems).to have(0).problems
71
+ expect(problems).to be_empty
72
72
  end
73
73
  end
74
74
 
@@ -84,7 +84,7 @@ describe 'arrow_on_right_operand_line' do
84
84
  end
85
85
 
86
86
  it 'detects a problem' do
87
- expect(problems).to have(1).problem
87
+ expect(problems.size).to eq(1)
88
88
  end
89
89
 
90
90
  it 'creates a warning' do
@@ -129,7 +129,7 @@ describe 'arrow_on_right_operand_line' do
129
129
  end
130
130
 
131
131
  it 'detects a problem' do
132
- expect(problems).to have(1).problem
132
+ expect(problems.size).to eq(1)
133
133
  end
134
134
 
135
135
  it 'creates a warning' do
@@ -6,7 +6,7 @@ describe 'autoloader_layout' do
6
6
  let(:path) { 'foo/manifests/bar.pp' }
7
7
 
8
8
  it 'does not detect any problems' do
9
- expect(problems).to have(0).problems
9
+ expect(problems).to be_empty
10
10
  end
11
11
  end
12
12
 
@@ -15,7 +15,7 @@ describe 'autoloader_layout' do
15
15
  let(:path) { 'foo/manifests/bar/baz.pp' }
16
16
 
17
17
  it 'does not detect any problems' do
18
- expect(problems).to have(0).problems
18
+ expect(problems).to be_empty
19
19
  end
20
20
  end
21
21
 
@@ -24,7 +24,7 @@ describe 'autoloader_layout' do
24
24
  let(:path) { 'foo/manifests/init.pp' }
25
25
 
26
26
  it 'does not detect any problems' do
27
- expect(problems).to have(0).problems
27
+ expect(problems).to be_empty
28
28
  end
29
29
  end
30
30
 
@@ -34,7 +34,7 @@ describe 'autoloader_layout' do
34
34
  let(:msg) { 'foo::bar not in autoload module layout' }
35
35
 
36
36
  it 'only detects a single problem' do
37
- expect(problems).to have(1).problem
37
+ expect(problems.size).to eq(1)
38
38
  end
39
39
 
40
40
  it 'creates an error' do
@@ -56,7 +56,7 @@ describe 'autoloader_layout' do
56
56
  let(:path) { 'bar/manifests/init.pp' }
57
57
 
58
58
  it 'does not detect any problems' do
59
- expect(problems).to have(0).problems
59
+ expect(problems).to be_empty
60
60
  end
61
61
  end
62
62
 
@@ -65,7 +65,7 @@ describe 'autoloader_layout' do
65
65
  let(:path) { 'puppet-foo/manifests/init.pp' }
66
66
 
67
67
  it 'detects a single problem' do
68
- expect(problems).to have(1).problems
68
+ expect(problems.size).to eq(1)
69
69
  end
70
70
  end
71
71
 
@@ -82,7 +82,7 @@ describe 'autoloader_layout' do
82
82
  let(:path) { 'puppet-foo/manifests/bar.pp' }
83
83
 
84
84
  it 'detects a single problem' do
85
- expect(problems).to have(1).problems
85
+ expect(problems.size).to eq(1)
86
86
  end
87
87
  end
88
88
 
@@ -99,7 +99,7 @@ describe 'autoloader_layout' do
99
99
  let(:path) { 'puppet-foo/manifests/init.pp' }
100
100
 
101
101
  it 'does not detect any problems' do
102
- expect(problems).to have(0).problems
102
+ expect(problems).to be_empty
103
103
  end
104
104
  end
105
105
  end
@@ -12,7 +12,7 @@ describe 'class_inherits_from_params_class' do
12
12
  end
13
13
 
14
14
  it 'only detects a single problem' do
15
- expect(problems).to have(1).problem
15
+ expect(problems.size).to eq(1)
16
16
  end
17
17
 
18
18
  it 'creates a warning' do
@@ -33,7 +33,7 @@ describe 'class_inherits_from_params_class' do
33
33
  end
34
34
 
35
35
  it 'does not detect any problems' do
36
- expect(problems).to have(0).problems
36
+ expect(problems).to be_empty
37
37
  end
38
38
  end
39
39
  end
@@ -40,9 +40,10 @@ describe 'code_on_top_scope' do
40
40
  END
41
41
  end
42
42
 
43
+ it { expect(problems.size).to eq(4) }
44
+
43
45
  its(:problems) do
44
46
  is_expected.to contain_warning('code outside of class or define block - include')
45
- is_expected.to have(4).problems
46
47
  end
47
48
  end
48
49
  end
@@ -7,7 +7,7 @@ describe 'inherits_across_namespaces' do
7
7
  let(:code) { 'class foo::bar inherits foo { }' }
8
8
 
9
9
  it 'does not detect any problems' do
10
- expect(problems).to have(0).problems
10
+ expect(problems).to be_empty
11
11
  end
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ describe 'inherits_across_namespaces' do
15
15
  let(:code) { 'class foo::bar inherits foo::baz { }' }
16
16
 
17
17
  it 'does not detect any problems' do
18
- expect(problems).to have(0).problems
18
+ expect(problems).to be_empty
19
19
  end
20
20
  end
21
21
 
@@ -23,7 +23,7 @@ describe 'inherits_across_namespaces' do
23
23
  let(:code) { 'class foo::bar inherits baz { }' }
24
24
 
25
25
  it 'only detects a single problem' do
26
- expect(problems).to have(1).problem
26
+ expect(problems.size).to eq(1)
27
27
  end
28
28
 
29
29
  it 'creates a warning' do
@@ -7,7 +7,7 @@ describe 'names_containing_uppercase' do
7
7
  let(:class_msg) { "defined type 'FooBar' contains illegal uppercase" }
8
8
 
9
9
  it 'only detects a single problem' do
10
- expect(problems).to have(1).problem
10
+ expect(problems.size).to eq(1)
11
11
  end
12
12
 
13
13
  it 'creates an error' do
@@ -21,7 +21,7 @@ describe 'names_containing_uppercase' do
21
21
  let(:class_msg) { "class 'FooBar' contains illegal uppercase" }
22
22
 
23
23
  it 'only detects a single problem' do
24
- expect(problems).to have(1).problem
24
+ expect(problems.size).to eq(1)
25
25
  end
26
26
 
27
27
  it 'creates an error' do
@@ -35,7 +35,7 @@ describe 'names_containing_uppercase' do
35
35
  let(:class_msg) { "class 'Foo::BarFoo' contains illegal uppercase" }
36
36
 
37
37
  it 'only detects a single problem' do
38
- expect(problems).to have(1).problem
38
+ expect(problems.size).to eq(1)
39
39
  end
40
40
 
41
41
  it 'creates an error' do
@@ -9,7 +9,7 @@ describe 'names_containing_dash' do
9
9
  let(:path) { 'foo-bar/manifests/init.pp' }
10
10
 
11
11
  it 'only detects a single problem' do
12
- expect(problems).to have(1).problem
12
+ expect(problems.size).to eq(1)
13
13
  end
14
14
 
15
15
  it 'creates an error' do
@@ -22,7 +22,7 @@ describe 'names_containing_dash' do
22
22
  let(:path) { 'foo/manifests/foo-bar.pp' }
23
23
 
24
24
  it 'only detect a single problem' do
25
- expect(problems).to have(1).problem
25
+ expect(problems.size).to eq(1)
26
26
  end
27
27
 
28
28
  it 'creates an error' do
@@ -35,7 +35,7 @@ describe 'names_containing_dash' do
35
35
  let(:path) { 'foo/manifests/bar-foo.pp' }
36
36
 
37
37
  it 'only detects a single problem' do
38
- expect(problems).to have(1).problem
38
+ expect(problems.size).to eq(1)
39
39
  end
40
40
 
41
41
  it 'creates an error' do
@@ -8,7 +8,7 @@ describe 'nested_classes_or_defines' do
8
8
  let(:code) { 'class foo { }' }
9
9
 
10
10
  it 'does not detect any problems' do
11
- expect(problems).to have(0).problems
11
+ expect(problems).to be_empty
12
12
  end
13
13
  end
14
14
 
@@ -23,7 +23,7 @@ describe 'nested_classes_or_defines' do
23
23
  end
24
24
 
25
25
  it 'only detects a single problem' do
26
- expect(problems).to have(1).problem
26
+ expect(problems.size).to eq(1)
27
27
  end
28
28
 
29
29
  it 'creates a warning' do
@@ -43,7 +43,7 @@ describe 'nested_classes_or_defines' do
43
43
  end
44
44
 
45
45
  it 'does not detect any problems' do
46
- expect(problems).to have(0).problems
46
+ expect(problems).to be_empty
47
47
  end
48
48
  end
49
49
 
@@ -59,7 +59,7 @@ describe 'nested_classes_or_defines' do
59
59
  end
60
60
 
61
61
  it 'does not detect any problems' do
62
- expect(problems).to have(0).problems
62
+ expect(problems).to be_empty
63
63
  end
64
64
  end
65
65
 
@@ -74,7 +74,7 @@ describe 'nested_classes_or_defines' do
74
74
  end
75
75
 
76
76
  it 'only detects a single problem' do
77
- expect(problems).to have(1).problems
77
+ expect(problems.size).to eq(1)
78
78
  end
79
79
 
80
80
  it 'creates a warning' do
@@ -8,7 +8,7 @@ describe 'parameter_order' do
8
8
  let(:code) { "#{type} foo($bar, $baz='gronk') { }" }
9
9
 
10
10
  it 'does not detect any problems' do
11
- expect(problems).to have(0).problems
11
+ expect(problems).to be_empty
12
12
  end
13
13
  end
14
14
 
@@ -16,7 +16,7 @@ describe 'parameter_order' do
16
16
  let(:code) { "#{type} foo($bar=extlookup($name)) {}" }
17
17
 
18
18
  it 'does not detect any problems' do
19
- expect(problems).to have(0).problems
19
+ expect(problems).to be_empty
20
20
  end
21
21
  end
22
22
 
@@ -24,7 +24,7 @@ describe 'parameter_order' do
24
24
  let(:code) { "#{type} foo($bar='baz', $gronk) { }" }
25
25
 
26
26
  it 'only detects a single problem' do
27
- expect(problems).to have(1).problem
27
+ expect(problems.size).to eq(1)
28
28
  end
29
29
 
30
30
  col = ((type == 'class') ? 23 : 24)
@@ -42,7 +42,7 @@ describe 'parameter_order' do
42
42
  end
43
43
 
44
44
  it 'does not detect any problems' do
45
- expect(problems).to have(0).problems
45
+ expect(problems).to be_empty
46
46
  end
47
47
  end
48
48
 
@@ -55,7 +55,7 @@ describe 'parameter_order' do
55
55
  end
56
56
 
57
57
  it 'only detects a single problem' do
58
- expect(problems).to have(1).problem
58
+ expect(problems.size).to eq(1)
59
59
  end
60
60
 
61
61
  col = ((type == 'class') ? 35 : 36)
@@ -76,7 +76,7 @@ describe 'parameter_order' do
76
76
  end
77
77
 
78
78
  it 'does not detect any problems' do
79
- expect(problems).to have(0).problems
79
+ expect(problems).to be_empty
80
80
  end
81
81
  end
82
82
 
@@ -98,7 +98,7 @@ describe 'parameter_order' do
98
98
  END
99
99
  end
100
100
 
101
- it { expect(problems).to have(0).problem }
101
+ it { expect(problems.size).to eq(0) }
102
102
  end
103
103
 
104
104
  context "#{type} parameter w/a hash containing a variable followed by an optional parameter" do
@@ -132,7 +132,7 @@ describe 'parameter_order' do
132
132
  END
133
133
  end
134
134
 
135
- it { expect(problems).to have(0).problem }
135
+ it { expect(problems.size).to eq(0) }
136
136
  end
137
137
 
138
138
  context "#{type} parameter with array operation" do
@@ -150,7 +150,7 @@ describe 'parameter_order' do
150
150
  END
151
151
  end
152
152
 
153
- it { expect(problems).to have(0).problems }
153
+ it { expect(problems).to be_empty }
154
154
  end
155
155
 
156
156
  context "#{type} parameters of Optional type are just regular parameters" do
@@ -163,7 +163,7 @@ describe 'parameter_order' do
163
163
  END
164
164
  end
165
165
 
166
- it { expect(problems).to have(1).problems }
166
+ it { expect(problems.size).to eq(1) }
167
167
  end
168
168
 
169
169
  [['Custom::Type1', 'Custom::Type2'], ['Custom::Type1', 'String'], ['String', 'Custom::Type2']].each_with_index do |testtypes, i| # rubocop:disable Performance/CollectionLiteralInLoop
@@ -177,7 +177,7 @@ describe 'parameter_order' do
177
177
  END
178
178
  end
179
179
 
180
- it { expect(problems).to have(0).problems }
180
+ it { expect(problems).to be_empty }
181
181
  end
182
182
 
183
183
  context "#{type} parameters of custom type - two values - #{i}" do
@@ -190,7 +190,7 @@ describe 'parameter_order' do
190
190
  END
191
191
  end
192
192
 
193
- it { expect(problems).to have(0).problems }
193
+ it { expect(problems).to be_empty }
194
194
  end
195
195
 
196
196
  context "#{type} parameters of custom type - one value, wrong order - #{i}" do
@@ -203,7 +203,7 @@ describe 'parameter_order' do
203
203
  END
204
204
  end
205
205
 
206
- it { expect(problems).to have(1).problems }
206
+ it { expect(problems.size).to eq(1) }
207
207
  end
208
208
 
209
209
  context "#{type} parameters of custom type - one value, right order - #{i}" do
@@ -216,7 +216,7 @@ describe 'parameter_order' do
216
216
  END
217
217
  end
218
218
 
219
- it { expect(problems).to have(0).problems }
219
+ it { expect(problems).to be_empty }
220
220
  end
221
221
  end
222
222
  end
@@ -7,7 +7,7 @@ describe 'right_to_left_relationship' do
7
7
  let(:code) { 'Class[foo] -> Class[bar]' }
8
8
 
9
9
  it 'does not detect any problems' do
10
- expect(problems).to have(0).problems
10
+ expect(problems).to be_empty
11
11
  end
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ describe 'right_to_left_relationship' do
15
15
  let(:code) { 'Class[foo] <- Class[bar]' }
16
16
 
17
17
  it 'only detects a single problem' do
18
- expect(problems).to have(1).problem
18
+ expect(problems.size).to eq(1)
19
19
  end
20
20
 
21
21
  it 'creates a warning' do
@@ -13,7 +13,7 @@ describe 'variable_scope' do
13
13
  end
14
14
 
15
15
  it 'only detects a single problem' do
16
- expect(problems).to have(1).problem
16
+ expect(problems.size).to eq(1)
17
17
  end
18
18
 
19
19
  it 'creates a warning' do
@@ -31,7 +31,7 @@ describe 'variable_scope' do
31
31
  end
32
32
 
33
33
  it 'does not detect any problems' do
34
- expect(problems).to have(0).problems
34
+ expect(problems).to be_empty
35
35
  end
36
36
  end
37
37
 
@@ -46,7 +46,7 @@ describe 'variable_scope' do
46
46
  end
47
47
 
48
48
  it 'does not detect any problems' do
49
- expect(problems).to have(0).problems
49
+ expect(problems).to be_empty
50
50
  end
51
51
  end
52
52
 
@@ -65,7 +65,7 @@ describe 'variable_scope' do
65
65
  end
66
66
 
67
67
  it 'does not detect any problems' do
68
- expect(problems).to have(0).problems
68
+ expect(problems).to be_empty
69
69
  end
70
70
  end
71
71
 
@@ -80,7 +80,7 @@ describe 'variable_scope' do
80
80
  end
81
81
 
82
82
  it 'does not detect any problems' do
83
- expect(problems).to have(0).problems
83
+ expect(problems).to be_empty
84
84
  end
85
85
  end
86
86
 
@@ -94,7 +94,7 @@ describe 'variable_scope' do
94
94
  end
95
95
 
96
96
  it 'does not detect any problems' do
97
- expect(problems).to have(0).problems
97
+ expect(problems).to be_empty
98
98
  end
99
99
  end
100
100
 
@@ -108,7 +108,7 @@ describe 'variable_scope' do
108
108
  end
109
109
 
110
110
  it 'only detects a single problem' do
111
- expect(problems).to have(1).problem
111
+ expect(problems.size).to eq(1)
112
112
  end
113
113
 
114
114
  it 'creates a warning' do
@@ -126,7 +126,7 @@ describe 'variable_scope' do
126
126
  end
127
127
 
128
128
  it 'does not detect any problems' do
129
- expect(problems).to have(0).problems
129
+ expect(problems).to be_empty
130
130
  end
131
131
  end
132
132
 
@@ -143,7 +143,7 @@ describe 'variable_scope' do
143
143
  end
144
144
 
145
145
  it 'does not detect any problems' do
146
- expect(problems).to have(0).problems
146
+ expect(problems).to be_empty
147
147
  end
148
148
  end
149
149
 
@@ -159,7 +159,7 @@ describe 'variable_scope' do
159
159
  end
160
160
 
161
161
  it 'does not detect any problems' do
162
- expect(problems).to have(0).problems
162
+ expect(problems).to be_empty
163
163
  end
164
164
  end
165
165
 
@@ -181,7 +181,7 @@ describe 'variable_scope' do
181
181
  end
182
182
 
183
183
  it 'only detects two problems' do
184
- expect(problems).to have(2).problem
184
+ expect(problems.size).to eq(2)
185
185
  end
186
186
 
187
187
  it 'creates two warnings' do
@@ -213,7 +213,7 @@ describe 'variable_scope' do
213
213
  end
214
214
 
215
215
  it 'only detects three problems' do
216
- expect(problems).to have(3).problem
216
+ expect(problems.size).to eq(3)
217
217
  end
218
218
 
219
219
  it 'creates three warnings' do
@@ -234,16 +234,16 @@ describe 'variable_scope' do
234
234
  end
235
235
 
236
236
  it 'does not detect any problems' do
237
- expect(problems).to have(0).problems
237
+ expect(problems).to be_empty
238
238
  end
239
239
  end
240
240
  end
241
241
 
242
- context 'support the use of facts and trusted facts for Puppet 3.5 onwards' do
242
+ context 'support the use of facts and trusted facts' do
243
243
  let(:code) do
244
244
  <<-END
245
245
  class foo() {
246
- if $facts['osfamily'] == 'redhat' or $trusted['osfamily'] == 'redhat' {
246
+ if $facts['os']['family'] == 'redhat' or $trusted['os']['family'] == 'redhat' {
247
247
  $redhat = true
248
248
  }
249
249
  }
@@ -251,7 +251,7 @@ describe 'variable_scope' do
251
251
  end
252
252
 
253
253
  it 'does not detect any problems' do
254
- expect(problems).to have(0).problems
254
+ expect(problems).to be_empty
255
255
  end
256
256
  end
257
257
 
@@ -265,7 +265,7 @@ describe 'variable_scope' do
265
265
  end
266
266
 
267
267
  it 'does not detect any problems' do
268
- expect(problems).to have(0).problems
268
+ expect(problems).to be_empty
269
269
  end
270
270
  end
271
271
 
@@ -279,7 +279,7 @@ describe 'variable_scope' do
279
279
  end
280
280
 
281
281
  it 'does not detect any problems' do
282
- expect(problems).to have(0).problems
282
+ expect(problems).to be_empty
283
283
  end
284
284
  end
285
285
 
@@ -294,7 +294,7 @@ describe 'variable_scope' do
294
294
  end
295
295
 
296
296
  it 'does not detect any problems' do
297
- expect(problems).to have(0).problems
297
+ expect(problems).to be_empty
298
298
  end
299
299
  end
300
300
 
@@ -309,7 +309,7 @@ describe 'variable_scope' do
309
309
  end
310
310
 
311
311
  it 'only detects one problem' do
312
- expect(problems).to have(1).problems
312
+ expect(problems.size).to eq(1)
313
313
  end
314
314
 
315
315
  it 'creates one warning' do
@@ -327,7 +327,7 @@ describe 'variable_scope' do
327
327
  end
328
328
 
329
329
  it 'does not detect any problems' do
330
- expect(problems).to have(0).problems
330
+ expect(problems).to be_empty
331
331
  end
332
332
  end
333
333
  end
@@ -8,7 +8,7 @@ describe 'slash_comments' do
8
8
  let(:code) { '// foo' }
9
9
 
10
10
  it 'only detects a single problem' do
11
- expect(problems).to have(1).problem
11
+ expect(problems.size).to eq(1)
12
12
  end
13
13
 
14
14
  it 'creates a warning' do
@@ -30,7 +30,7 @@ describe 'slash_comments' do
30
30
  let(:code) { '// foo' }
31
31
 
32
32
  it 'only detects a single problem' do
33
- expect(problems).to have(1).problem
33
+ expect(problems.size).to eq(1)
34
34
  end
35
35
 
36
36
  it 'fixes the manifest' do
@@ -13,7 +13,7 @@ describe 'star_comments' do
13
13
  end
14
14
 
15
15
  it 'only detects a single problem' do
16
- expect(problems).to have(1).problem
16
+ expect(problems.size).to eq(1)
17
17
  end
18
18
 
19
19
  it 'creates a warning' do
@@ -49,7 +49,7 @@ describe 'star_comments' do
49
49
  end
50
50
 
51
51
  it 'only detects a single problem' do
52
- expect(problems).to have(1).problem
52
+ expect(problems.size).to eq(1)
53
53
  end
54
54
 
55
55
  it 'creates a warning' do
@@ -76,7 +76,7 @@ describe 'star_comments' do
76
76
  end
77
77
 
78
78
  it 'only detects a single problem' do
79
- expect(problems).to have(1).problem
79
+ expect(problems.size).to eq(1)
80
80
  end
81
81
 
82
82
  it 'creates a warning' do
@@ -109,7 +109,7 @@ describe 'star_comments' do
109
109
  end
110
110
 
111
111
  it 'only detects a single problem' do
112
- expect(problems).to have(1).problem
112
+ expect(problems.size).to eq(1)
113
113
  end
114
114
 
115
115
  it 'creates a warning' do