diff options
Diffstat (limited to 'test/language/parser.rb')
| -rwxr-xr-x | test/language/parser.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb index 1bbd894e4..2a0e9c02d 100755 --- a/test/language/parser.rb +++ b/test/language/parser.rb @@ -45,9 +45,9 @@ class TestParser < Test::Unit::TestCase assert_raise(Puppet::ParseError, "Did not fail while parsing %s" % file) { parser.file = file ast = parser.parse - config = mkcompile(parser) + config = mkcompiler(parser) config.compile - #ast.classes[""].evaluate :scope => config.topscope + #ast.classes[""].evaluate config.topscope } Puppet::Type.allclear } @@ -868,7 +868,7 @@ file { "/tmp/yayness": def test_newclass scope = mkscope - parser = scope.compile.parser + parser = scope.compiler.parser mkcode = proc do |ary| classes = ary.collect do |string| @@ -891,7 +891,7 @@ file { "/tmp/yayness": assert(parser.classes["myclass"], "Could not find definition") assert_equal("myclass", parser.classes["myclass"].classname) assert_equal(%w{original code}, - parser.classes["myclass"].code.evaluate(:scope => scope)) + parser.classes["myclass"].code.evaluate(scope)) # Newclass behaves differently than the others -- it just appends # the code to the existing class. @@ -901,7 +901,7 @@ file { "/tmp/yayness": end assert(klass, "Did not return class when appending") assert_equal(%w{original code something new}, - parser.classes["myclass"].code.evaluate(:scope => scope)) + parser.classes["myclass"].code.evaluate(scope)) # Now create the same class name in a different scope assert_nothing_raised { @@ -914,7 +914,7 @@ file { "/tmp/yayness": assert_equal("other::myclass", other.classname) assert_equal("other::myclass", other.namespace) assert_equal(%w{something diff}, - other.code.evaluate(:scope => scope)) + other.code.evaluate(scope)) # Make sure newclass deals correctly with nodes with no code klass = parser.newclass("nocode") @@ -925,7 +925,7 @@ file { "/tmp/yayness": end assert(klass, "Did not return class with no code") assert_equal(%w{yay test}, - parser.classes["nocode"].code.evaluate(:scope => scope)) + parser.classes["nocode"].code.evaluate(scope)) # Then try merging something into nothing parser.newclass("nocode2", :code => mkcode.call(%w{foo test})) @@ -936,7 +936,7 @@ file { "/tmp/yayness": end assert(klass, "Did not return class with no code") assert_equal(%w{foo test}, - parser.classes["nocode2"].code.evaluate(:scope => scope)) + parser.classes["nocode2"].code.evaluate(scope)) # And lastly, nothing and nothing klass = parser.newclass("nocode3") |
