David Schmitt
unread,Dec 15, 2015, 1:12:23 PM12/15/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppe...@googlegroups.com, puppet...@googlegroups.com
Hi *,
I'm very happy to announce a new release of rspec-puppet, the unit test
framework for puppet manifests:
Rspec-puppet 2.3.0 now supports testing custom types, `:undef` values in
params, structured facts, and checks resource dependencies recursively.
The settings in `module_path` and `manifest` are now respected
throughout the code base. The former default for `module_path`
(`'/etc/puppet/modules'`) was dropped to avoid accidentally poisoning
the test environment with unrelated code.
To reduce the maintenance overhead of boilerplate code, rspec-puppet now
provides some of the code that rspec-puppet-init deployed in helper
files that you can just `require` instead.
This release also reduces memory usage on bigger testsuites drastically
by reducing the caching of compiled catalogs.
### Changed
- Limit the catalogue cache to 16 entries. Significant memory savings
and reduced runtime were observed in testing this.
- Prevent Puppet 3's \_timestamp fact from invalidating cache.
- Extracted catalog cache from RSpec::Puppet::Support.
- Updated README to use the rspec 3 syntax, and additional explanations.
- `contain_file(...).with_content(...)` will now only show the diff and
not the full contents of the file.
### Added
- Custom type testing example group and matcher.
- before/require/subscribe/notify checking now searches recursively
through all dependencies. `File[a] -> File[b] -> File[c]` is now matched
by `contain_file('a').that_comes_before('File[c]')`, whereas earlier
versions would have missed that.
- `let(:params)` now allows `:undef` to pass a literal undef value
through to the subject.
- Support structured facts with keys as symbols or strings (\#295).
- rspec-puppet-init now creates smaller files, using rspec-puppet
helpers, instead of pasting code into the module.
- Added a list of related projects to the README.
### Fixed
- Fix #276: `compile.and_raise_error` now correctly considers successful
compilation an error
- Puppet's `modulepath` can now contain multiple entries and
rspec-puppet will configure puppet to load code from all of them
- Support running with rspec 2.99 again
- non-class resources are now covered by the coverage code
- Fix #323/MODULES-2374: autorequires checking doesn't abort on
"undefined method \`[]' for nil:NilClass"
- improved documentation for hiera integration, added example spec
- document the `scope` property
### Credits
Thanks to Adrien Thebo, Alex Harvey, Brian, Dan Bode, Dominic Cleal,
Javier Palacios, Jeff McCune, Jordan Moldow, Peter van Zetten, Raphaël
Pinson, Simon Kohlmeyer, and Tristan Colgate for their contributions to
this release.
-- David Schmitt