From 88aa1bc2cfef4517fca9e467c86f70ae356be883 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 11 Mar 2009 23:52:53 -0500 Subject: Fixing tests broken in previous commits Signed-off-by: Luke Kanies --- test/language/snippets.rb | 4 ++-- test/network/client/resource.rb | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/test/language/snippets.rb b/test/language/snippets.rb index a1d0f5d4f..dfd4950e7 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -358,7 +358,7 @@ class TestSnippets < Test::Unit::TestCase }.each { |count, str| path = "/tmp/singlequote%s" % count assert_file(path) - assert_equal(str, @catalog.resource(:file, path).should(:content)) + assert_equal(str, @catalog.resource(:file, path).parameter(:content).actual_content) } end @@ -403,7 +403,7 @@ class TestSnippets < Test::Unit::TestCase path = "/tmp/multisubtest" assert_file(path) file = @catalog.resource(:file, path) - assert_equal("sub2", file.should(:content), "sub2 did not override content") + assert_equal("{md5}5fbef65269a99bddc2106251dd89b1dc", file.should(:content), "sub2 did not override content") assert_mode_equal(0755, path) end diff --git a/test/network/client/resource.rb b/test/network/client/resource.rb index 3ad9282bb..ba84fc27e 100755 --- a/test/network/client/resource.rb +++ b/test/network/client/resource.rb @@ -35,29 +35,20 @@ class TestResourceClient < Test::Unit::TestCase client = mkclient() # Test describing - tresource = nil - assert_nothing_raised { - tresource = client.describe("file", file) - } + tresource = client.describe("file", file) assert(tresource, "Did not get response") assert_instance_of(Puppet::TransObject, tresource) - resource = nil - assert_nothing_raised { - resource = tresource.to_ral - } + resource = tresource.to_ral assert_events([], resource) File.unlink(file) assert_events([:file_created], resource) File.unlink(file) # Now test applying - result = nil - assert_nothing_raised { - result = client.apply(tresource) - } + result = client.apply(tresource) assert(FileTest.exists?(file), "File was not created on apply") end end -- cgit