1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'validate_hash function' do
6 it 'validates a single argument' do
12 apply_manifest(pp, :catch_failures => true)
14 it 'validates an multiple arguments' do
18 validate_hash($one,$two)
21 apply_manifest(pp, :catch_failures => true)
24 %{validate_hash('{ "not" => "hash" }')},
25 %{validate_hash('string')},
26 %{validate_hash(["array"])},
27 %{validate_hash(undef)}
29 it "rejects #{pp.inspect}" do
30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//)
35 it 'handles improper number of arguments'