Files
puppetlabs-create_resources/spec/spec_helper.rb
Dan Bode 63c405d1a9 update code to support more simultaneous versions
This commit is intended to resolve some of the issues
related with create_resources support for
multiple Puppet versions.

Basically, create_resources often needs to be an
external dependency if it's used in modules, so that
those modules can work with 2.6.x.

In this case, it needs to be added to the fixtures.yaml
file. Since there is no way to specify that
certain dependant modules should only be added for
certain versions of Puppet, then create_resources will
even override the native one for versions >= 2.7.0
in all unit tests.

For this reason, the module needs to be able to
simultaneously support the targeted versions:
2.6.x ,2.7.x, 3.0.x, and 3.1.x.

This commit does the following:
   - back ports all 2.7.x changes to create_resources
(so that it will work with 3.0)
   - modifies tests, unit tests so they pass with
     all targeted versions.
   - update Rakefile and spec_helper to use
     puppetlabs_spec_helper

of coarse, there is a bigger question of if I should
even be doing this, it has several pitfalls:
  - modules will be tested with an external create_resoures
    which may not be in sync with the one in core
  - I would recommend that modules not pull in
    create_resources as a dep in their module file,
    which means
       1. it becomes an extra step for 2.6.x
       2. module's are not tested and used consistenly
2013-03-03 12:08:57 -08:00

2 lines
52 B
Ruby

require 'puppetlabs_spec_helper/module_spec_helper'