This work updates a number of Gems to the latest versions (rspec,
rspec-puppet), and updates and tweaks a bunch of tests to work
with the updated gems.
The previous behavior of the tests checked the behavior of the
underlying functions library when called with no arguments; this commit
updates the tests to conform to the functions API and test what happens
when a function is called with no args.
Without this patch the stdlib spec tests are failing against recent
versions of Puppet. The root cause of this problem is a change in the
behavior of create_resources in Puppet 6baa57b. The change in behavior
caused the :name key to be omitted from the hash returned by
Puppet::Parser::Resource#to_hash which in turn is causing the test
failure.
This patch addresses the problem by updating the test to match the
description of the example. Only the attribute :ensure is checked
instead of the full hash itself.
Without this patch the ensure_packages() function has no rspec behavior
examples. This patch fixes the problem by filling out a spec file with
expected behaviors I could think of.