1 require 'spec_helper_acceptance'
3 describe 'validate_hash function' do
9 it 'validates a single argument' do
10 apply_manifest(pp1, :catch_failures => true)
16 validate_hash($one,$two)
18 it 'validates an multiple arguments' do
19 apply_manifest(pp2, :catch_failures => true)
23 %{validate_hash('{ "not" => "hash" }')},
24 %{validate_hash('string')},
25 %{validate_hash(["array"])},
26 %{validate_hash(undef)},
28 it "rejects #{pp3.inspect}" do
29 expect(apply_manifest(pp3, :expect_failures => true).stderr).to match(%r{})
34 it 'handles improper number of arguments'