Commit Graph

3 Commits

Author SHA1 Message Date
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
Ilya Margolin e474433342 fix tests for rspec-2.11.0 2012-08-09 09:51:47 +10:00
Tim Sharpe cf7100f95c Have Travis-ci test rspec-puppet automatically 2012-04-05 16:27:33 -07:00