HomePhorge

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

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>

Details

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

Event Timeline

Jacob Helwig <jacob@puppetlabs.com> committed rPUb4cacfd8f955: Clarify logic and error messages when initializing Puppet::FileBucket::File (authored by Jacob Helwig <jacob@puppetlabs.com>).Aug 3 2011, 1:33 AM