From d2f2bc0ee4a4f2895452b5ab318eb5e6df7fff6b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@980ebf18-57e1-0310-9a29-db15c13687c0> Date: Thu, 9 Aug 2007 09:41:25 +0000 Subject: Trivial mock cleanups git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2763 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/certmgr/inventory.rb | 4 ++-- test/network/xmlrpc/processor.rb | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/certmgr/inventory.rb b/test/certmgr/inventory.rb index 3d9da1e5d..15d3e5217 100755 --- a/test/certmgr/inventory.rb +++ b/test/certmgr/inventory.rb @@ -52,8 +52,8 @@ class TestCertInventory < Test::Unit::TestCase cert = mksignedcert(ca, "host.domain.com") assert_nothing_raised do - file = nil - file.expects(:puts).times(1).with do |written| + file = mock() + file.expects(:puts).with do |written| written.include? cert.subject.to_s end Puppet::Util::Config.any_instance.stubs(:write) diff --git a/test/network/xmlrpc/processor.rb b/test/network/xmlrpc/processor.rb index 97cc2a774..101d268b2 100755 --- a/test/network/xmlrpc/processor.rb +++ b/test/network/xmlrpc/processor.rb @@ -64,8 +64,7 @@ class TestXMLRPCProcessor < Test::Unit::TestCase request.expects(:handler=).with("myhandler") request.expects(:method=).with("mymethod") - # I can't get this expectation to take with the argument, for some reason. - @processor.expects(:verify) + @processor.expects(:verify).times(2) @processor.expects(:handle).with(request.call, "params", request.name, request.ip) -- cgit