puppet-lint 4.2.0 → 4.2.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 (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
@@ -8,7 +8,7 @@ describe 'unquoted_resource_title' do
8
8
  let(:code) { "file { '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
 
@@ -16,7 +16,7 @@ describe 'unquoted_resource_title' do
16
16
  let(:code) { 'file { foo: }' }
17
17
 
18
18
  it 'only detects a single problem' do
19
- expect(problems).to have(1).problem
19
+ expect(problems.size).to eq(1)
20
20
  end
21
21
 
22
22
  it 'creates a warning' do
@@ -33,7 +33,7 @@ describe 'unquoted_resource_title' 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
 
@@ -46,7 +46,7 @@ describe 'unquoted_resource_title' do
46
46
  end
47
47
 
48
48
  it 'only detects a single problem' do
49
- expect(problems).to have(1).problem
49
+ expect(problems.size).to eq(1)
50
50
  end
51
51
 
52
52
  it 'creates a warning' do
@@ -65,7 +65,7 @@ describe 'unquoted_resource_title' 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 'unquoted_resource_title' do
80
80
  end
81
81
 
82
82
  it 'only detects a single problem' do
83
- expect(problems).to have(1).problem
83
+ expect(problems.size).to eq(1)
84
84
  end
85
85
 
86
86
  it 'creates a warning' do
@@ -92,7 +92,7 @@ describe 'unquoted_resource_title' do
92
92
  let(:code) { "file { ['foo', 'bar']: }" }
93
93
 
94
94
  it 'does not detect any problems' do
95
- expect(problems).to have(0).problems
95
+ expect(problems).to be_empty
96
96
  end
97
97
  end
98
98
 
@@ -110,7 +110,7 @@ describe 'unquoted_resource_title' do
110
110
  end
111
111
 
112
112
  it 'does not detect any problems' do
113
- expect(problems).to have(0).problems
113
+ expect(problems).to be_empty
114
114
  end
115
115
  end
116
116
 
@@ -125,7 +125,7 @@ describe 'unquoted_resource_title' do
125
125
  end
126
126
 
127
127
  it 'does not detect any problems' do
128
- expect(problems).to have(0).problems
128
+ expect(problems).to be_empty
129
129
  end
130
130
  end
131
131
 
@@ -147,7 +147,7 @@ describe 'unquoted_resource_title' do
147
147
  end
148
148
 
149
149
  it 'does not detect any problems' do
150
- expect(problems).to have(0).problems
150
+ expect(problems).to be_empty
151
151
  end
152
152
  end
153
153
  end
@@ -165,7 +165,7 @@ describe 'unquoted_resource_title' do
165
165
  let(:code) { 'file { foo: }' }
166
166
 
167
167
  it 'only detects a single problem' do
168
- expect(problems).to have(1).problem
168
+ expect(problems.size).to eq(1)
169
169
  end
170
170
 
171
171
  it 'fixes the manifest' do
@@ -193,7 +193,7 @@ describe 'unquoted_resource_title' do
193
193
  end
194
194
 
195
195
  it 'only detects a single problem' do
196
- expect(problems).to have(1).problem
196
+ expect(problems.size).to eq(1)
197
197
  end
198
198
 
199
199
  it 'fixes the manifest' do
@@ -225,7 +225,7 @@ describe 'unquoted_resource_title' do
225
225
  end
226
226
 
227
227
  it 'only detects a single problem' do
228
- expect(problems).to have(1).problem
228
+ expect(problems.size).to eq(1)
229
229
  end
230
230
 
231
231
  it 'fixes the manifest' do
@@ -8,7 +8,7 @@ describe 'double_quoted_strings' do
8
8
  let(:code) { "exec { \"/usr/bin/wget -O - '${source}' | /usr/bin/apt-key add -\": }" }
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 'double_quoted_strings' do
16
16
  let(:code) { "\"aoeu\" '${foo}'" }
17
17
 
18
18
  it 'only detects a single problem' do
19
- expect(problems).to have(1).problem
19
+ expect(problems.size).to eq(1)
20
20
  end
21
21
 
22
22
  it 'creates a warning' do
@@ -28,7 +28,7 @@ describe 'double_quoted_strings' do
28
28
  let(:code) { "'grep \"status=sent\" /var/log/mail.log'" }
29
29
 
30
30
  it 'does not detect any problems' do
31
- expect(problems).to have(0).problems
31
+ expect(problems).to be_empty
32
32
  end
33
33
  end
34
34
 
@@ -36,7 +36,7 @@ describe 'double_quoted_strings' do
36
36
  let(:code) { "service { 'foo': } # \"bar\"" }
37
37
 
38
38
  it 'does not detect any problems' do
39
- expect(problems).to have(0).problems
39
+ expect(problems).to be_empty
40
40
  end
41
41
  end
42
42
 
@@ -44,16 +44,16 @@ describe 'double_quoted_strings' do
44
44
  let(:code) { %("foo\n") }
45
45
 
46
46
  it 'does not detect any problems' do
47
- expect(problems).to have(0).problems
47
+ expect(problems).to be_empty
48
48
  end
49
49
  end
50
50
 
51
51
  context 'double quoted string with backslash for continuation' do
52
52
  let(:code) do
53
53
  <<-END
54
- class puppet::master::maintenance (
54
+ class puppet::server::maintenance (
55
55
  ) {
56
- cron { 'puppet_master_reports_cleanup':
56
+ cron { 'puppet_server_reports_cleanup':
57
57
  command => "/usr/bin/find /var/lib/puppet/reports -type f -mtime +15 \
58
58
  -delete && /usr/bin/find /var/lib/puppet/reports -mindepth 1 \
59
59
  -empty -type d -delete",
@@ -65,7 +65,7 @@ describe 'double_quoted_strings' 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
 
@@ -73,7 +73,7 @@ describe 'double_quoted_strings' do
73
73
  let(:code) { "class { 'foo': boolFlag => \"true\" }" }
74
74
 
75
75
  it 'only detects a single problem' do
76
- expect(problems).to have(1).problem
76
+ expect(problems.size).to eq(1)
77
77
  end
78
78
 
79
79
  it 'creates a warning' do
@@ -85,7 +85,7 @@ describe 'double_quoted_strings' do
85
85
  let(:code) { "class { 'foo': boolFlag => \"false\" }" }
86
86
 
87
87
  it 'only detects a single problem' do
88
- expect(problems).to have(1).problem
88
+ expect(problems.size).to eq(1)
89
89
  end
90
90
 
91
91
  it 'creates a warning' do
@@ -108,7 +108,7 @@ describe 'double_quoted_strings' do
108
108
  end
109
109
 
110
110
  it 'does not detect any problems' do
111
- expect(problems).to have(0).problems
111
+ expect(problems).to be_empty
112
112
  end
113
113
  end
114
114
 
@@ -116,7 +116,7 @@ describe 'double_quoted_strings' do
116
116
  let(:code) { %( $ztring = "this string contains \l random escape" ) }
117
117
 
118
118
  it 'only detects a single problem' do
119
- expect(problems).to have(1).problem
119
+ expect(problems.size).to eq(1)
120
120
  end
121
121
 
122
122
  it 'creates a warning' do
@@ -128,7 +128,7 @@ describe 'double_quoted_strings' do
128
128
  let(:code) { "\"this 'string' 'has' lots of 'quotes'\"" }
129
129
 
130
130
  it 'does not detect any problems' do
131
- expect(problems).to have(0).problems
131
+ expect(problems).to be_empty
132
132
  end
133
133
  end
134
134
 
@@ -136,7 +136,7 @@ describe 'double_quoted_strings' do
136
136
  let(:code) { %(notify { "'foo'": }) }
137
137
 
138
138
  it 'does not detect any problems' do
139
- expect(problems).to have(0).problems
139
+ expect(problems).to be_empty
140
140
  end
141
141
  end
142
142
  end
@@ -154,7 +154,7 @@ describe 'double_quoted_strings' do
154
154
  let(:code) { "exec { \"/usr/bin/wget -O - '${source}' | /usr/bin/apt-key add -\": }" }
155
155
 
156
156
  it 'does not detect any problems' do
157
- expect(problems).to have(0).problems
157
+ expect(problems).to be_empty
158
158
  end
159
159
 
160
160
  it 'does not modify the manifest' do
@@ -166,7 +166,7 @@ describe 'double_quoted_strings' do
166
166
  let(:code) { "\"sed -i 's/^;*[[:space:]]*${name}[[:space:]]*=.*$/${name} = ${value}/g' file\"" }
167
167
 
168
168
  it 'does not detect any problems' do
169
- expect(problems).to have(0).problems
169
+ expect(problems).to be_empty
170
170
  end
171
171
 
172
172
  it 'does not modify the manifest' do
@@ -178,7 +178,7 @@ describe 'double_quoted_strings' do
178
178
  let(:code) { "\"aoeu\" '${foo}'" }
179
179
 
180
180
  it 'only detects a single problem' do
181
- expect(problems).to have(1).problem
181
+ expect(problems.size).to eq(1)
182
182
  end
183
183
 
184
184
  it 'fixes the manifest' do
@@ -194,7 +194,7 @@ describe 'double_quoted_strings' do
194
194
  let(:code) { "\"this 'string' 'has' lots of 'quotes'\"" }
195
195
 
196
196
  it 'does not detect any problems' do
197
- expect(problems).to have(0).problems
197
+ expect(problems).to be_empty
198
198
  end
199
199
 
200
200
  it 'does not modify the manifest' do
@@ -8,7 +8,7 @@ describe 'only_variable_string' 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
@@ -20,7 +20,7 @@ describe 'only_variable_string' do
20
20
  let(:code) { '"${foo[0]}"' }
21
21
 
22
22
  it 'only detects a single problem' do
23
- expect(problems).to have(1).problem
23
+ expect(problems.size).to eq(1)
24
24
  end
25
25
 
26
26
  it 'creates a warning' do
@@ -32,7 +32,7 @@ describe 'only_variable_string' do
32
32
  let(:code) { '"${foo[0][aoeuaoeu][bar][999]}"' }
33
33
 
34
34
  it 'only detects a single problem' do
35
- expect(problems).to have(1).problem
35
+ expect(problems.size).to eq(1)
36
36
  end
37
37
 
38
38
  it 'creates a warning' do
@@ -69,7 +69,7 @@ describe 'only_variable_string' do
69
69
  let(:code) { '"${foo}"' }
70
70
 
71
71
  it 'only detects a single problem' do
72
- expect(problems).to have(1).problem
72
+ expect(problems.size).to eq(1)
73
73
  end
74
74
 
75
75
  it 'fixes the manifest' do
@@ -85,7 +85,7 @@ describe 'only_variable_string' do
85
85
  let(:code) { '"${foo[0]}"' }
86
86
 
87
87
  it 'only detects a single problem' do
88
- expect(problems).to have(1).problem
88
+ expect(problems.size).to eq(1)
89
89
  end
90
90
 
91
91
  it 'fixes the manifest' do
@@ -101,7 +101,7 @@ describe 'only_variable_string' do
101
101
  let(:code) { '"${foo[0][aoeuaoeu][bar][999]}"' }
102
102
 
103
103
  it 'only detects a single problem' do
104
- expect(problems).to have(1).problem
104
+ expect(problems.size).to eq(1)
105
105
  end
106
106
 
107
107
  it 'fixes the manifest' do
@@ -7,7 +7,7 @@ describe 'puppet_url_without_modules' do
7
7
  let(:code) { "'puppet:///modules/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
 
@@ -16,7 +16,7 @@ describe 'puppet_url_without_modules' do
16
16
  let(:code) { "'puppet:///foo'" }
17
17
 
18
18
  it 'only detects a single problem' do
19
- expect(problems).to have(1).problem
19
+ expect(problems.size).to eq(1)
20
20
  end
21
21
 
22
22
  it 'creates a warning' do
@@ -38,7 +38,7 @@ describe 'puppet_url_without_modules' do
38
38
  let(:code) { "'puppet:///foo'" }
39
39
 
40
40
  it 'only detects a single problem' do
41
- expect(problems).to have(1).problem
41
+ expect(problems.size).to eq(1)
42
42
  end
43
43
 
44
44
  it 'fixes the manifest' do
@@ -55,7 +55,7 @@ describe 'puppet_url_without_modules' do
55
55
  let(:code) { File.read('spec/fixtures/test/manifests/url_interpolation.pp') }
56
56
 
57
57
  it 'detects several problems' do
58
- expect(problems).to have(4).problem
58
+ expect(problems.size).to eq(4)
59
59
  end
60
60
  end
61
61
  end
@@ -8,7 +8,7 @@ describe 'quoted_booleans' do
8
8
  let(:code) { "class { 'foo': boolFlag => 'false' }" }
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
@@ -20,7 +20,7 @@ describe 'quoted_booleans' do
20
20
  let(:code) { "class { 'foo': boolFlag => 'true' }" }
21
21
 
22
22
  it 'only detects a single problem' do
23
- expect(problems).to have(1).problem
23
+ expect(problems.size).to eq(1)
24
24
  end
25
25
 
26
26
  it 'creates a warning' do
@@ -32,7 +32,7 @@ describe 'quoted_booleans' do
32
32
  let(:code) { "class { 'foo': boolFlag => \"true\" }" }
33
33
 
34
34
  it 'only detects a single problem' do
35
- expect(problems).to have(1).problem
35
+ expect(problems.size).to eq(1)
36
36
  end
37
37
 
38
38
  it 'creates a warning' do
@@ -44,7 +44,7 @@ describe 'quoted_booleans' do
44
44
  let(:code) { "class { 'foo': boolFlag => \"false\" }" }
45
45
 
46
46
  it 'only detects a single problem' do
47
- expect(problems).to have(1).problem
47
+ expect(problems.size).to eq(1)
48
48
  end
49
49
 
50
50
  it 'creates a warning' do
@@ -66,7 +66,7 @@ describe 'quoted_booleans' do
66
66
  let(:code) { "class { 'foo': boolFlag => 'false' }" }
67
67
 
68
68
  it 'only detects a single problem' do
69
- expect(problems).to have(1).problem
69
+ expect(problems.size).to eq(1)
70
70
  end
71
71
 
72
72
  it 'fixes the manifest' do
@@ -82,7 +82,7 @@ describe 'quoted_booleans' do
82
82
  let(:code) { "class { 'foo': boolFlag => 'true' }" }
83
83
 
84
84
  it 'only detects a single problem' do
85
- expect(problems).to have(1).problem
85
+ expect(problems.size).to eq(1)
86
86
  end
87
87
 
88
88
  it 'fixes the manifest' do
@@ -98,7 +98,7 @@ describe 'quoted_booleans' do
98
98
  let(:code) { "class { 'foo': boolFlag => \"true\" }" }
99
99
 
100
100
  it 'only detects a single problem' do
101
- expect(problems).to have(1).problem
101
+ expect(problems.size).to eq(1)
102
102
  end
103
103
 
104
104
  it 'fixes the manifest' do
@@ -114,7 +114,7 @@ describe 'quoted_booleans' do
114
114
  let(:code) { "class { 'foo': boolFlag => \"false\" }" }
115
115
 
116
116
  it 'only detects a single problem' do
117
- expect(problems).to have(1).problem
117
+ expect(problems.size).to eq(1)
118
118
  end
119
119
 
120
120
  it 'fixes the manifest' do
@@ -7,7 +7,7 @@ describe 'single_quote_string_with_variables' do
7
7
  let(:code) { "\"aoeu\" '${foo}'" }
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
@@ -26,7 +26,7 @@ describe 'single_quote_string_with_variables' do
26
26
  END
27
27
  end
28
28
 
29
- it { expect(problems).to have(0).problem }
29
+ it { expect(problems.size).to eq(0) }
30
30
  end
31
31
 
32
32
  context 'single quoted inline epp with dollar signs has no problems' do
@@ -40,6 +40,6 @@ describe 'single_quote_string_with_variables' do
40
40
  END
41
41
  end
42
42
 
43
- it { expect(problems).to have(0).problem }
43
+ it { expect(problems.size).to eq(0) }
44
44
  end
45
45
  end
@@ -8,7 +8,7 @@ describe 'variables_not_enclosed' do
8
8
  let(:code) { '" $gronk"' }
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
@@ -20,7 +20,7 @@ describe 'variables_not_enclosed' do
20
20
  let(:code) { ("'groovy'\n" * 20) + '" $gronk"' }
21
21
 
22
22
  it 'only detects a single problem' do
23
- expect(problems).to have(1).problem
23
+ expect(problems.size).to eq(1)
24
24
  end
25
25
 
26
26
  it 'creates a warning' do
@@ -42,7 +42,7 @@ describe 'variables_not_enclosed' do
42
42
  let(:code) { '" $gronk"' }
43
43
 
44
44
  it 'only detects a single problem' do
45
- expect(problems).to have(1).problem
45
+ expect(problems.size).to eq(1)
46
46
  end
47
47
 
48
48
  it 'fixes the manifest' do
@@ -58,7 +58,7 @@ describe 'variables_not_enclosed' do
58
58
  let(:code) { ("'groovy'\n" * 20) + '" $gronk"' }
59
59
 
60
60
  it 'only detects a single problem' do
61
- expect(problems).to have(1).problem
61
+ expect(problems.size).to eq(1)
62
62
  end
63
63
 
64
64
  it 'fixes the manifest' do
@@ -74,7 +74,7 @@ describe 'variables_not_enclosed' do
74
74
  let(:code) { '"$foo-$bar"' }
75
75
 
76
76
  it 'only detects two problems' do
77
- expect(problems).to have(2).problems
77
+ expect(problems.size).to eq(2)
78
78
  end
79
79
 
80
80
  it 'fixes the manifest' do
@@ -91,7 +91,7 @@ describe 'variables_not_enclosed' do
91
91
  let(:code) { %("$foo['bar'][2]something") }
92
92
 
93
93
  it 'only detects a single problem' do
94
- expect(problems).to have(1).problem
94
+ expect(problems.size).to eq(1)
95
95
  end
96
96
 
97
97
  it 'fixes the manifest' do
@@ -107,7 +107,7 @@ describe 'variables_not_enclosed' do
107
107
  let(:code) { '"$hostname-keystore"' }
108
108
 
109
109
  it 'only detects a single problem' do
110
- expect(problems).to have(1).problem
110
+ expect(problems.size).to eq(1)
111
111
  end
112
112
 
113
113
  it 'fixes the manifest' do
@@ -7,7 +7,7 @@ describe 'variable_contains_dash' do
7
7
  let(:code) { '$foo-bar' }
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 a warning' do
@@ -19,7 +19,7 @@ describe 'variable_contains_dash' do
19
19
  let(:code) { '" $foo-bar"' }
20
20
 
21
21
  it 'only detects a single problem' do
22
- expect(problems).to have(1).problem
22
+ expect(problems.size).to eq(1)
23
23
  end
24
24
 
25
25
  it 'creates a warning' do
@@ -7,7 +7,7 @@ describe 'variable_is_lowercase' do
7
7
  let(:code) { '$fooBar' }
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 a warning' do
@@ -19,7 +19,7 @@ describe 'variable_is_lowercase' do
19
19
  let(:code) { '$foobar' }
20
20
 
21
21
  it 'does not detect any problems' do
22
- expect(problems).to have(0).problems
22
+ expect(problems).to be_empty
23
23
  end
24
24
  end
25
25
 
@@ -27,7 +27,7 @@ describe 'variable_is_lowercase' do
27
27
  let(:code) { %("${Integer(fact('memory.system.total_bytes'))}") }
28
28
 
29
29
  it 'does not detect any problems' do
30
- expect(problems).to have(0).problems
30
+ expect(problems).to be_empty
31
31
  end
32
32
  end
33
33
 
@@ -35,7 +35,7 @@ describe 'variable_is_lowercase' do
35
35
  let(:code) { '"${fooBar}"' }
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 a warning' do
@@ -47,7 +47,7 @@ describe 'variable_is_lowercase' do
47
47
  let(:code) { '"${foobar}"' }
48
48
 
49
49
  it 'does not detect any problems' do
50
- expect(problems).to have(0).problems
50
+ expect(problems).to be_empty
51
51
  end
52
52
  end
53
53
  end
@@ -13,7 +13,7 @@ describe '140chars' 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
 
@@ -27,7 +27,7 @@ describe '140chars' do
27
27
  end
28
28
 
29
29
  it 'does not detect any problems' do
30
- expect(problems).to have(0).problems
30
+ expect(problems).to be_empty
31
31
  end
32
32
  end
33
33
 
@@ -41,7 +41,7 @@ describe '140chars' do
41
41
  end
42
42
 
43
43
  it 'does not detect any problems' do
44
- expect(problems).to have(0).problems
44
+ expect(problems).to be_empty
45
45
  end
46
46
  end
47
47
 
@@ -49,7 +49,7 @@ describe '140chars' do
49
49
  let(:code) { 'a' * 141 }
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
@@ -13,7 +13,7 @@ describe '2sp_soft_tabs' 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 an error' do
@@ -17,7 +17,7 @@ describe '80chars' do
17
17
  end
18
18
 
19
19
  it 'does not detect any problems' do
20
- expect(problems).to have(0).problems
20
+ expect(problems).to be_empty
21
21
  end
22
22
  end
23
23
 
@@ -31,7 +31,7 @@ describe '80chars' 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
 
@@ -45,7 +45,7 @@ describe '80chars' do
45
45
  end
46
46
 
47
47
  it 'does not detect any problems' do
48
- expect(problems).to have(0).problems
48
+ expect(problems).to be_empty
49
49
  end
50
50
  end
51
51
 
@@ -53,7 +53,7 @@ describe '80chars' do
53
53
  let(:code) { 'a' * 81 }
54
54
 
55
55
  it 'only detects a single problem' do
56
- expect(problems).to have(1).problem
56
+ expect(problems.size).to eq(1)
57
57
  end
58
58
 
59
59
  it 'creates a warning' do