Skip to content

Commit ccce8aa

Browse files
committed
Update spec tests to adjust for failing to parse validated files
1 parent ade57eb commit ccce8aa

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
2-
"true"
3-
"false"
2+
$x = "true"
3+
$y = "false"
44
# lint:endignore
55

6-
"true"
6+
$z = "true"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
"true" # lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
2-
"false" # lint:ignore:quoted_booleans lint:ignore:double_quoted_strings reason
1+
$x = "true" # lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
2+
$y = "false" # lint:ignore:quoted_booleans lint:ignore:double_quoted_strings reason

spec/puppet-lint/bin_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
require 'rspec/mocks'
33
require 'optparse'
44

5+
invalid_code_error = "puppet-lint: the manifest code cannot be validated by `puppet parser validate`\npuppet-lint: try again once the code is valid"
6+
57
class CommandRun
68
attr_accessor :stdout, :stderr, :exitstatus
79

@@ -71,7 +73,7 @@ def initialize(args)
7173
let(:args) { 'spec/fixtures/test/manifests/malformed.pp' }
7274

7375
its(:exitstatus) { is_expected.to eq(1) }
74-
its(:stdout) { is_expected.to eq('ERROR: Syntax error (try running `puppet parser validate <file>`) on line 1') }
76+
its(:stdout) { is_expected.to eq(invalid_code_error) }
7577
end
7678

7779
context 'when limited to errors only' do

0 commit comments

Comments
 (0)