HomePhorge

(PUP-4178) Complete defined() function and spec tests
503baa55f83eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-4178) Complete defined() function and spec tests

Before this, the tests were not covering all variants. This commit
organizes the spec test for the defined function from a usage
perspective. To ask if a class is defined, if a resource is defined, a
variable etc. Tests were also added for numeric (match) variables.

This revealed that it was not possible to be specific about if a name
must be a reference to a class, defined or resource type.

This commit also adds the ability to be specific by using a meta type.
Thus, defined(Type[Class[foo]]) returns true iff foo is a class, and
defined(Type[Resource[foo]]) returns true iff foo is a build in or
defined resource type.

Details

Provenance
Henrik Lindberg <henrik.lindberg@cloudsmith.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU05a47044b75c: (PUP-4178) Correct impl of defined() for Ruby 1.8.7
Branches
Unknown
Tags
Unknown

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPU503baa55f83e: (PUP-4178) Complete defined() function and spec tests (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Apr 21 2015, 5:57 PM