Age | Commit message (Collapse) | Author | Files | Lines |
|
The resource_expressions_spec contained a useful way of writing language
specification tests. This extracts those out so that they can be reused
in other places.
|
|
Using the have_resource matcher makes the tests a little shorter and
more expressive. It also uses the common way of matching so that we can
get better error reporting.
It turns out that one of the tests was matching against the incorrect
class name, so that is now fixed.
This also extracts a be_resource matcher so that you can match against
an individual resource independent of a catalog.
|
|
Checking that catalogs have particular resources is useful. Let's make
it easier. This also adds parameter matching to the resource matcher.
|
|
This changes the loader used by the code to list environments to be a
composition of the legacy environments and the new directory
environments.
|
|
This starts the process of creating a Puppet::Environments::Directory
that will find environments from a particular directory. The directory
has sub-directories, where each sub-directory name is the environment
name.
|
|
This adds a new matcher to the JSONMatchers to validate json against a
given json-schema. All of the json schema validation now goes through
this one matcher, which also handles skipping the checks on windows.
|
|
The output did not include':' for the "Got" tokens.
|
|
The Lexer2 (not yet used by the parser) performs >3x faster on
lexing of 10 lines of mixed code including simple expression
interpolation than the original lexer (which does not keep track
of detailed positions).
|
|
This adds the 'contain' function. When used inside of a class definition, it
will create a containment relationship such that the current class contains
the argument of 'contain'.
|
|
The logic for determining how to add generated resources into the
catalog was tightly bound with the rest of the transaction code. This
makes it hard to test the exact logic around that. By extracting a class
it exposes that logic in a much more testable form.
|
|
This adds a specification to the order in which resources appear in the
catalog. They must appear in the order in which they are added to the
catalog.
In order to make this kind of assertion easier this commit also brings
in Ramcrest.
|
|
This reverts commit 751efa9174adfe1bc0a5707855e6ba16ff2aed43, reversing
changes made to 023cffdbb9b30945fbf4dcaded4f63428ce54ea7.
Conflicts:
lib/puppet/dsl/context.rb
spec/unit/dsl/context_spec.rb
|
|
This adds new Ruby DSL features by Mateusz Lenik.
This was developed as a Google Summer of Code project.
This commit contains all of the new Ruby DSL work in one single commit.
|
|
These make the JSON tests much easier to read and
write. They're the first custom matchers that I can
find, so they're breaking a bit of new ground,
but the JSON tests were pretty hard to read
and there was a lot of duplication, so it seemed
worth it.
Note that for some reason they're not working on
Facts - it seems to get immediately turned into
a full instance by the JSON parsing subsystem,
and I've no idea why.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|