summaryrefslogtreecommitdiff
path: root/spec/unit/functions/reduce_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-07-02(maint) Move the interative functions shared behavior to common dirHenrik Lindberg1-0/+1
This commit moves the shared behavior for iterative functions to shared_behaviours/iterative_functions.
2014-07-02(PUP-2794) Modify the shared spec for iterative functionsHenrik Lindberg1-0/+2
This updates the shared tests for iterative functions to also be capable of handling reduce. This also adds missing tests that were part of one of the individual tests earlier. The test for reduce now also invokes the shared behavior for argument checking.
2014-07-02(PUP-2794) Change function reduce to use dispatchers for block arityHenrik Lindberg1-0/+1
This changes the reduce function to use the dispatchers to check the block arity.
2014-06-14(PUP-2755) Move iterative functions to the new APIHenrik Lindberg1-0/+92
This moves all the iterative functions to the 4x function API. Functions are now simpler to read. A shared utility module was created for repeated asserts. While testing it was clear that it is difficult to use Puppet.lookup(:loaders), and the evaluator was changed to get the loaders via the compiler instead. The evaluator tests are changed to make use of the simplified handling of the loaders. The tests for the functions that have moved, were also moved, but are unchanged in what they test.