rspec-puppet/lib
Jeff McCune e6b88cff4f Use puppetlabs_spec_helper to test parser functions
Without this patch applied rspec-puppet reaches deep inside of Puppet
and uses an unsupported and private interface to obtain functions and
scope instances.  This is a problem because Puppet Labs considers
internal classes such as Puppet::Parser::Scope as private and internal.

We change these classes without warning and this is a maintenance issue
for third party testing tools.

This patch fixes this maintenance problem by using the compatibility
layer implemented in the puppetlabs_spec_helper.  When we change the
internal behavior of private classes such as Puppet::Parser::Scope,
we'll update the spec helper module methods to provide a version
agnostic way to get instances of these internal objects.

As an example, a supported way to get a scope instance is:

    PuppetlabsSpec::PuppetInternals.scope

Instead of the private and unsupported method of:

    Puppet::Parser::Scope.new

This patch introduces a Gem dependency onto the puppetlabs_spec_helper
gem.
2012-08-14 16:25:09 -07:00
..
rspec-puppet Use puppetlabs_spec_helper to test parser functions 2012-08-14 16:25:09 -07:00
rspec-puppet.rb Merge pull request #21 from nanliu/tb/config 2012-03-12 16:17:12 -07:00