From: Ken Barber Date: Wed, 29 Jun 2011 20:59:18 +0000 (+0100) Subject: New abs test. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=ff56d9917e52b1a0d14478af74411e81e3633e4f;p=puppet-stdlib.git New abs test. --- diff --git a/spec/unit/parser/functions/abs_spec.rb b/spec/unit/parser/functions/abs_spec.rb index cd2902a..6bf0b41 100755 --- a/spec/unit/parser/functions/abs_spec.rb +++ b/spec/unit/parser/functions/abs_spec.rb @@ -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