diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2008-10-04 00:16:17 +0200 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-10-05 14:53:13 +1100 |
| commit | 79bb1f201c1479a15fa2f0f8ad5467bd357ed707 (patch) | |
| tree | 6887338bab7a90d4ca1f4e56282e4baeddc63673 /test | |
| parent | 750e9abc64af58e547e7b1ad5698c71feb071bf6 (diff) | |
| download | puppet-79bb1f201c1479a15fa2f0f8ad5467bd357ed707.tar.gz puppet-79bb1f201c1479a15fa2f0f8ad5467bd357ed707.tar.xz puppet-79bb1f201c1479a15fa2f0f8ad5467bd357ed707.zip | |
Rspec Tests for #381.
Moved part of the old resource reference tests to rspec.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/language/ast/resource_reference.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/test/language/ast/resource_reference.rb b/test/language/ast/resource_reference.rb index 1f554d90f..75cb53c12 100755 --- a/test/language/ast/resource_reference.rb +++ b/test/language/ast/resource_reference.rb @@ -23,34 +23,6 @@ class TestASTResourceReference < Test::Unit::TestCase @parser = @scope.compiler.parser end - def test_evaluate - @parser.newdefine "one::two" - @parser.newdefine "one-two" - [%w{File /tmp/yay}, %w{One::Two three}, %w{One-two three}].each do |type, title| - ref = newref(type, title) - - evaled = nil - assert_nothing_raised("Could not evaluate resource ref") do - evaled = ref.evaluate(@scope) - end - - assert_equal(type, evaled.type, "Type did not translate correctly") - assert_equal(title, evaled.title, "Title did not translate correctly") - end - end - - def test_finding_classes_for_reference - @parser.newclass "one" - ref = newref("Class", "one") - evaled = nil - assert_nothing_raised("Could not evaluate resource ref") do - evaled = ref.evaluate(@scope) - end - - assert_equal("Class", evaled.type, "Did not set type to 'class'") - assert_equal("one", evaled.title, "Did not look up class corectly") - end - # Related to #706, make sure resource references correctly translate to qualified types. def test_scoped_references @parser.newdefine "one" |
