4 describe "the time function" do
6 Puppet::Parser::Functions.autoloader.loadall
10 @scope = Puppet::Parser::Scope.new
14 Puppet::Parser::Functions.function("time").should == "function_time"
17 it "should raise a ParseError if there is more than 2 arguments" do
18 lambda { @scope.function_time(['','']) }.should( raise_error(Puppet::ParseError))
21 it "should return a number" do
22 result = @scope.function_time([])
23 result.class.should(eq(Fixnum))
26 it "should be higher then when I wrote this test" do
27 result = @scope.function_time([])
28 result.should(be > 1311953157)
31 it "should be lower then 1.5 trillion" do
32 result = @scope.function_time([])
33 result.should(be < 1500000000)