summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions
diff options
context:
space:
mode:
authorKen Barber <ken@bob.sh>2011-06-29 21:59:18 +0100
committerKen Barber <ken@bob.sh>2011-06-29 21:59:18 +0100
commitff56d9917e52b1a0d14478af74411e81e3633e4f (patch)
tree40bdf0b67e5b286501c038521dfcb14fa32614f4 /spec/unit/parser/functions
parent790818116e953118ba9eab5e5bef6d63f7bbc1fa (diff)
downloadpuppet-stdlib-ff56d9917e52b1a0d14478af74411e81e3633e4f.tar.gz
puppet-stdlib-ff56d9917e52b1a0d14478af74411e81e3633e4f.tar.bz2
New abs test.
Diffstat (limited to 'spec/unit/parser/functions')
-rwxr-xr-xspec/unit/parser/functions/abs_spec.rb5
1 files changed, 5 insertions, 0 deletions
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