4 describe "the parseyaml function" do
6 Puppet::Parser::Functions.autoloader.loadall
10 @scope = Puppet::Parser::Scope.new
14 Puppet::Parser::Functions.function("parseyaml").should == "function_parseyaml"
17 it "should raise a ParseError if there is less than 1 arguments" do
18 lambda { @scope.function_parseyaml([]) }.should( raise_error(Puppet::ParseError))
21 it "should convert YAML to a data structure" do
27 result = @scope.function_parseyaml([yaml])
28 result.should(eq(['aaa','bbb','ccc']))