4 describe "the range function" do
6 Puppet::Parser::Functions.autoloader.loadall
10 @scope = Puppet::Parser::Scope.new
14 Puppet::Parser::Functions.function("range").should == "function_range"
17 it "should raise a ParseError if there is less than 1 arguments" do
18 lambda { @scope.function_range([]) }.should( raise_error(Puppet::ParseError))
21 it "should return a letter range" do
22 result = @scope.function_range(["a","d"])
23 result.should(eq(['a','b','c','d']))
26 it "should return a number range" do
27 result = @scope.function_range(["1","4"])
28 result.should(eq([1,2,3,4]))