diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-11-03 19:58:38 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-11-03 19:59:37 -0700 |
| commit | 9e2a0e41dfb253a19180aeea6b66f65ca8d63133 (patch) | |
| tree | f102b396669c074b59eab5c2e59c5145b5bae6ab /test/lib | |
| parent | b1ef091d0209a59ac747568f83416e992db93ea8 (diff) | |
| parent | 85543a41978924a42490d0c3f1f5437c95b7c869 (diff) | |
Merge commit '85543a4'
This updates `master` to the pre-agile-iteration state.
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/puppettest/parsertesting.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/lib/puppettest/parsertesting.rb b/test/lib/puppettest/parsertesting.rb index bd04c1ec5..411bad37a 100644 --- a/test/lib/puppettest/parsertesting.rb +++ b/test/lib/puppettest/parsertesting.rb @@ -94,16 +94,15 @@ module PuppetTest::ParserTesting def resourcedef(type, title, params) title = stringobj(title) unless title.is_a?(AST) + instance = AST::ResourceInstance.new(:title => title, :parameters => resourceparams(params)) assert_nothing_raised("Could not create #{type} #{title}") { return AST::Resource.new( :file => __FILE__, :line => __LINE__, - :title => title, :type => type, - - :parameters => resourceinst(params) + :instances => AST::ASTArray.new(:children => [instance]) ) } end @@ -122,9 +121,7 @@ module PuppetTest::ParserTesting :file => __FILE__, :line => __LINE__, :object => resourceref(type, title), - - :type => type, - :parameters => resourceinst(params) + :parameters => resourceparams(params) ) } end @@ -197,13 +194,13 @@ module PuppetTest::ParserTesting } end - def resourceinst(hash) + def resourceparams(hash) assert_nothing_raised("Could not create resource instance") { params = hash.collect { |param, value| resourceparam(param, value) } - return AST::ResourceInstance.new( + return AST::ASTArray.new( :file => tempfile, |
