puppetlabs/puppetlabs_spec_helper — pull request #20 by jeffmccune (2012-08-15 00:19:22+00:00)
Title: Add PuppetInternals.function_method compatibility bridge

Without this patch modules typically get entire scope objects in an effort to
invoke parser functions. RSpec::Puppet uses the method instance itself to
send the :call message to the method instance. The spec helper does not
provide a compatible way to obtain method instances for parser functions.

This is a problem because we need a compatible way to test functions that
does not incur a high maintenance cost on rspec-puppet.

This patch fixes the problem by implementing and compatible way to test
functions using their method instances. RSpec::Puppet has been patched in
https://github.com/rodjek/rspec-puppet/pull/39 to use this compatibility
layer.