4 describe "the prefix function" do
6 Puppet::Parser::Functions.autoloader.loadall
10 @scope = Puppet::Parser::Scope.new
14 Puppet::Parser::Functions.function("prefix").should == "function_prefix"
17 it "should raise a ParseError if there is less than 1 arguments" do
18 lambda { @scope.function_prefix([]) }.should( raise_error(Puppet::ParseError))
21 it "should return a prefixed array" do
22 result = @scope.function_prefix([['a','b','c'], 'p'])
23 result.should(eq(['pa','pb','pc']))