summaryrefslogtreecommitdiffstats
path: root/spec/unit/resource/reference.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removing Resource::Reference classesLuke Kanies2010-02-171-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is hopefully less messy than it first appears, but it's certainly cross-cutting. The reason for all of this is that we previously only looked up builtin resource types from outside the parser, but now that the defined resource types are available globally via environments, we can push that lookup code to Resource. Once we do that, however, we have to have environment and namespace information in every resource. Here I remove the Resource::Reference classes (except the AST class), and use Resource instances instead. I did this because the shared code between the two classes got incredibly complicated, such that they should have had a hierarchical relationship disallowed by their constants. This complexity convinced me just to get rid of References entirely. I also make Puppet::Parser::Resource a subclass of Puppet::Resource. There are still broken tests in test/, but this was a big enough commit I wanted to get it in. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing test structureLuke Kanies2010-02-171-8/+8
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing all of the test/ tests I broke in previous dev.Luke Kanies2008-12-181-0/+8
| | | | | | | | | Most of these are straightforward changes to the tests, but a couple required small refactorings (e.g., References can now be created with Puppet::Type instances, and they know how to extract the type/title from them). Signed-off-by: Luke Kanies <luke@madstop.com>
* Simplifying the initialization interface for ReferencesLuke Kanies2008-12-181-0/+10
| | | | | | | | | You previously had to call new(nil, "Foo[bar]") if you just had the resource reference as a string. Now you can call new("Foo[bar]"), but the old behaviour works, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding equality testing to Puppet::Resource::ReferenceLuke Kanies2008-12-181-0/+16
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming Puppet::ResourceReference to Puppet::Resource::ReferenceLuke Kanies2008-12-091-0/+77
Signed-off-by: Luke Kanies <luke@madstop.com>