summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-07-28 19:42:24 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-08-01 11:15:29 +1000
commit58a73b5c68485dc5d41a46936c31e5fad5f037b5 (patch)
treed8fa2e0b6429a1a1262bc19ad6d876b565500b42 /test
parent3ebf148bf3d82d25e690aec6ec49975e0837e604 (diff)
downloadpuppet-58a73b5c68485dc5d41a46936c31e5fad5f037b5.tar.gz
puppet-58a73b5c68485dc5d41a46936c31e5fad5f037b5.tar.xz
puppet-58a73b5c68485dc5d41a46936c31e5fad5f037b5.zip
Make sure node are referenced by their names
This patch uses the unused AST::HostName as the only way to reference a node in the AST nodes array. The AST::HostName respect the hash properties of the underlying string, to keep the O(1) hash properties. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'test')
-rw-r--r--test/lib/puppettest/support/collection.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/puppettest/support/collection.rb b/test/lib/puppettest/support/collection.rb
index 43df03048..9da15ea81 100644
--- a/test/lib/puppettest/support/collection.rb
+++ b/test/lib/puppettest/support/collection.rb
@@ -18,7 +18,7 @@ module PuppetTest::Support::Collection
query = nil
assert_nothing_raised("Could not parse '#{str}'") do
- query = parser.parse(code).classes[""].code[0].query
+ query = parser.parse(code).hostclass("").code[0].query
end
yield str, res, query