summaryrefslogtreecommitdiff
path: root/spec/lib/matchers
AgeCommit message (Collapse)AuthorFilesLines
2014-08-18(maint) Extract language specification toolsAndrew Parker1-0/+1
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.
2014-04-27(maint) Convert to using have_resource matcherAndrew Parker1-13/+45
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.
2014-02-03(Maint) Extract re-usable resource matcherAndrew Parker1-0/+35
Checking that catalogs have particular resources is useful. Let's make it easier. This also adds parameter matching to the resource matcher.
2014-01-23(PUP-1118) Load full environments from a directoryAndrew Parker2-2/+34
This changes the loader used by the code to list environments to be a composition of the legacy environments and the new directory environments.
2014-01-23(PUP-1118) List environments from a directoryAndrew Parker1-0/+27
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.
2014-01-14(PUP-1151) Consolidate JSON schema validationAndrew Parker1-79/+135
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.
2013-12-05(maint) Improve output from match_tokens2.Henrik Lindberg1-1/+1
The output did not include':' for the "Got" tokens.
2013-12-05(perf) Add Lexer2 - a faster Lexer replacementHenrik Lindberg1-0/+74
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).
2013-09-05(#8040) Add a function to specify containmentPatrick Carlisle1-0/+52
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'.
2013-08-13(#18508) Extract class to control generating resourcesAndrew Parker1-0/+48
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.
2013-07-29(#18508) Specify the order of resources in the catalogAndrew Parker2-0/+51
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.
2013-01-24Revert "Merge branch 'new-ruby-dsl-by-mlen'"Patrick Carlisle1-50/+0
This reverts commit 751efa9174adfe1bc0a5707855e6ba16ff2aed43, reversing changes made to 023cffdbb9b30945fbf4dcaded4f63428ce54ea7. Conflicts: lib/puppet/dsl/context.rb spec/unit/dsl/context_spec.rb
2012-11-27Add new Ruby DSL by Mateusz Lenik.Mateusz Lenik1-0/+50
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.
2011-04-14Adding json-specific matchersLuke Kanies1-0/+111
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>