- apply_manifest(pp, :expect_failures => true) do |r|
- expect(r.stderr).to match(/(syntax error|did not find expected key)/)
+ pp3 = <<-DOC
+ $a = "---\nhunter: washere\ntests: passing\n:"
+ $o = parseyaml($a)
+ $tests = $o['tests']
+ notice(inline_template('tests are <%= @tests.inspect %>'))
+ DOC
+ it 'raises error on incorrect yaml' do
+ apply_manifest(pp3, :expect_failures => true) do |r|
+ expect(r.stderr).to match(%r{(syntax error|did not find expected key)})