diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-06-25 18:35:26 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-06-25 18:35:26 -0700 |
commit | af41beb05cc1ec6a8a09fcc7e82fb701aeada37f (patch) | |
tree | 123d66555436470807d1d5cd2d601b592c200862 | |
parent | 6a8e6feb0aa448baca81ad510398021af8765331 (diff) | |
download | puppet-af41beb05cc1ec6a8a09fcc7e82fb701aeada37f.tar.gz puppet-af41beb05cc1ec6a8a09fcc7e82fb701aeada37f.tar.xz puppet-af41beb05cc1ec6a8a09fcc7e82fb701aeada37f.zip |
Remove an old test that had been unintentionally reintroduced by a mistake in a conflict resolution
-rwxr-xr-x | test/language/scope.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/test/language/scope.rb b/test/language/scope.rb index 282a01b1d..0bed35c14 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -228,54 +228,6 @@ Host <<||>>" "Did not add extra namespace correctly") end - def test_find_hostclass_and_find_definition - parser = mkparser - - # Make sure our scope calls the parser find_hostclass method with - # the right namespaces - scope = mkscope :parser => parser - - parser.singleton_class.send(:attr_accessor, :last) - - methods = [:find_hostclass, :find_definition] - methods.each do |m| - parser.meta_def(m) do |namespace, name| - @checked ||= [] - @checked << [namespace, name] - - # Only return a value on the last call. - if @last == namespace - ret = @checked.dup - @checked.clear - return ret - else - return nil - end - end - end - - test = proc do |should| - parser.last = scope.namespaces[-1] - methods.each do |method| - result = scope.send(method, "testing") - assert_equal(should, result, - "did not get correct value from %s with namespaces %s" % - [method, scope.namespaces.inspect]) - end - end - - # Start with the empty namespace - assert_nothing_raised { test.call([["", "testing"]]) } - - # Now add a namespace - scope.add_namespace("a") - assert_nothing_raised { test.call([["a", "testing"]]) } - - # And another - scope.add_namespace("b") - assert_nothing_raised { test.call([["a", "testing"], ["b", "testing"]]) } - end - # #629 - undef should be "" or :undef def test_lookupvar_with_undef scope = mkscope |