diff options
author | Ken Barber <ken@bob.sh> | 2011-07-24 00:39:17 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-24 00:39:17 +0100 |
commit | fde64f37c98291f4a5b9ee1fcf634288e42b730a (patch) | |
tree | 8142aaf86b7d2bad9a213c1116c1ec37960c491d /spec/unit/parser/functions/sort_spec.rb | |
parent | 07ee33455439d960b9996e8110e011437181b42a (diff) | |
download | puppet-stdlib-fde64f37c98291f4a5b9ee1fcf634288e42b730a.tar.gz puppet-stdlib-fde64f37c98291f4a5b9ee1fcf634288e42b730a.tar.bz2 |
(#1) - fleshed out some more tests.
Diffstat (limited to 'spec/unit/parser/functions/sort_spec.rb')
-rw-r--r-- | spec/unit/parser/functions/sort_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/unit/parser/functions/sort_spec.rb b/spec/unit/parser/functions/sort_spec.rb index ae62d5f..da5db7a 100644 --- a/spec/unit/parser/functions/sort_spec.rb +++ b/spec/unit/parser/functions/sort_spec.rb @@ -14,8 +14,13 @@ describe "the sort function" do Puppet::Parser::Functions.function("sort").should == "function_sort" end - it "should raise a ParseError if there is not 0 arguments" do - lambda { @scope.function_sort(['']) }.should( raise_error(Puppet::ParseError)) + it "should raise a ParseError if there is not 1 arguments" do + lambda { @scope.function_sort(['','']) }.should( raise_error(Puppet::ParseError)) + end + + it "should sort an array" do + result = @scope.function_sort([["a","c","b"]]) + result.should(eq(['a','b','c'])) end end |