]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
New abs test.
authorKen Barber <ken@bob.sh>
Wed, 29 Jun 2011 20:59:18 +0000 (21:59 +0100)
committerKen Barber <ken@bob.sh>
Wed, 29 Jun 2011 20:59:18 +0000 (21:59 +0100)
spec/unit/parser/functions/abs_spec.rb

index cd2902aae59b6aaeacc82def0735429d6645ad05..6bf0b41e4c4acd30d43b14514aaaf0a755ad5840 100755 (executable)
@@ -18,4 +18,9 @@ describe "the abs function" do
     lambda { @scope.function_abs([]) }.should( raise_error(Puppet::ParseError))
   end
 
+  it "should convert a negative number into a positive" do
+    result = @scope.function_abs([-34])
+    result.should(eq(34))
+  end
+
 end