HomePhorge

(maint) Properly mock test
c26d7286f79cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(maint) Properly mock test

The Module.unmet_dependencies method will call
Environment.module_by_forge_name and will blindly rescue all exceptions.
During the test, the module's environment instance variable was nil, so
we were calling Nil.module_by_forge_name, rescuing the error and
treating it as though we didn't find the module dependency.

This commit updates the test to specify the mocked environment.

We should seriously consider removing the blind rescue all exceptions,
and at least log when they occur.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU372da25acf7b: (PUP-3121) Use the forge name to resolve dependencies
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUc26d7286f79c: (maint) Properly mock test (authored by Josh Cooper <josh@puppetlabs.com>).Feb 2 2015, 6:08 PM