HomePhorge

Clarify logic and error messages when initializing Puppet::FileBucket::File
8c889187a469Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Clarify logic and error messages when initializing Puppet::FileBucket::File

Rather than stating the logic as 'if !thing', the two checks done when
initializing a new Puppet::FileBucket::File are now phrased as 'unless
thing', which should lessen the likelihood of overlooking the '!'.

We also now provide a reason for the ArgumentError being raised, which
should help users of Puppet::FileBucket::File quickly figure out what
is the problem when these exceptions are raised.

In addition to updating the tests to look for these new error
messages, we update the existing tests to specify which type of
exception, and what message it should have, when something is raised.

Reviewed-by: Nick Lewis <nick@puppetlabs.com>
(cherry picked from commit b4cacfd8f95577c514999b4dd6bcb7ad57e37207)

Details

Provenance
Jacob Helwig <jacob@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU2efaa855e9ef: Disable symlink related file tests on Windows
Branches
Unknown
Tags
Unknown

Event Timeline

Jacob Helwig <jacob@puppetlabs.com> committed rPU8c889187a469: Clarify logic and error messages when initializing Puppet::FileBucket::File (authored by Jacob Helwig <jacob@puppetlabs.com>).Aug 19 2011, 10:52 PM