HomePhorge

Enforce "must not should" on Puppet::Type instances in tests.
7a7bea767722Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Enforce "must not should" on Puppet::Type instances in tests.

Because we define a should method on Puppet::Type, and that conflicts with
the identically named method in RSpec, we have an alias for must defined in
the test helper.

Sadly, this isn't *complete*: if you call should on those instances you
actually get no failure, it just silently ignores your actual test.

This change monkey-patches Puppet::Type in the spec helper, and adds a type
check to fail hard if you supply something "illegal" as the argument to
Puppet::Type.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUc737f5066e6a: Merge pull request #828 from joshcooper/ticket/2.7.x/set-scheduled-tasks
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU7a7bea767722: Enforce "must not should" on Puppet::Type instances in tests. (authored by Daniel Pittman <daniel@puppetlabs.com>).Jul 10 2012, 9:27 PM