4 describe "the size function" do
6 Puppet::Parser::Functions.autoloader.loadall
10 @scope = Puppet::Parser::Scope.new
14 Puppet::Parser::Functions.function("size").should == "function_size"
17 it "should raise a ParseError if there is less than 1 arguments" do
18 lambda { @scope.function_size([]) }.should( raise_error(Puppet::ParseError))
21 it "should return the size of a string" do
22 result = @scope.function_size(["asdf"])
26 it "should return the size of an array" do
27 result = @scope.function_size([["a","b","c"]])