1 require 'spec_helper_acceptance'
3 describe 'validate_string function' do
9 it 'validates a single argument' do
10 apply_manifest(pp1, :catch_failures => true)
16 validate_string($one,$two)
18 it 'validates an multiple arguments' do
19 apply_manifest(pp2, :catch_failures => true)
23 validate_string(undef)
25 it 'validates undef' do
26 apply_manifest(pp3, :catch_failures => true)
30 %{validate_string({ 'a' => 'hash' })} => 'Hash',
31 %{validate_string(['array'])} => 'Array',
32 %{validate_string(false)} => 'FalseClass',
34 it "validates a non-string: #{pp4.inspect}" do
35 expect(apply_manifest(pp4, :expect_failures => true).stderr).to match(%r{a #{type}})
40 it 'handles improper number of arguments'