Skip to content

Commit

Permalink
Update spec tests to adjust for failing to parse validated files
Browse files Browse the repository at this point in the history
  • Loading branch information
rnelson0 committed Dec 13, 2016
1 parent d192cfb commit 1da9585
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spec/fixtures/test/manifests/ignore_multiple_block.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
"true"
"false"
$x = "true"
$y = "false"
# lint:endignore

"true"
$z = "true"
4 changes: 2 additions & 2 deletions spec/fixtures/test/manifests/ignore_multiple_line.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"true" # lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
"false" # lint:ignore:quoted_booleans lint:ignore:double_quoted_strings reason
$x = "true" # lint:ignore:double_quoted_strings lint:ignore:quoted_booleans
$y = "false" # lint:ignore:quoted_booleans lint:ignore:double_quoted_strings reason
4 changes: 3 additions & 1 deletion spec/puppet-lint/bin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
require 'rspec/mocks'
require 'optparse'

invalid_code_error = "puppet-lint: the manifest code cannot be validated by `puppet parser validate`\npuppet-lint: try again once the code is valid"

class CommandRun
attr_accessor :stdout, :stderr, :exitstatus

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

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

context 'when limited to errors only' do
Expand Down

0 comments on commit 1da9585

Please sign in to comment.