1 require 'spec_helper_acceptance'
3 describe 'is_string function' do
6 $a = ['aaa.com','bbb','ccc']
10 notify { 'output correct': }
13 it 'is_strings arrays' do
14 apply_manifest(pp1, :catch_failures => true) do |r|
15 expect(r.stdout).to match(%r{Notice: output correct})
24 notify { 'output correct': }
27 it 'is_strings true' do
28 apply_manifest(pp2, :catch_failures => true) do |r|
29 expect(r.stdout).to match(%r{Notice: output correct})
36 notice(inline_template('is_string is <%= @o.inspect %>'))
38 it 'is_strings strings' do
39 apply_manifest(pp3, :catch_failures => true) do |r|
40 expect(r.stdout).to match(%r{is_string is true})
47 notice(inline_template('is_string is <%= @o.inspect %>'))
49 it 'is_strings number strings' do
50 apply_manifest(pp4, :catch_failures => true) do |r|
51 expect(r.stdout).to match(%r{is_string is false})
60 notify { 'output correct': }
63 it 'is_strings floats' do
64 apply_manifest(pp5, :catch_failures => true) do |r|
65 expect(r.stdout).to match(%r{Notice: output correct})
74 notify { 'output correct': }
77 it 'is_strings integers' do
78 apply_manifest(pp6, :catch_failures => true) do |r|
79 expect(r.stdout).to match(%r{Notice: output correct})
84 $a = {'aaa'=>'www.com'}
88 notify { 'output correct': }
91 it 'is_strings hashes' do
92 apply_manifest(pp7, :catch_failures => true) do |r|
93 expect(r.stdout).to match(%r{Notice: output correct})
100 notice(inline_template('is_string is <%= @o.inspect %>'))
102 it 'is_strings undef' do
103 apply_manifest(pp8, :catch_failures => true) do |r|
104 expect(r.stdout).to match(%r{is_string is true})
108 describe 'failure' do
109 it 'handles improper argument counts'