summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author(no author) <(no author)@980ebf18-57e1-0310-9a29-db15c13687c0>2007-08-09 09:41:25 +0000
committer(no author) <(no author)@980ebf18-57e1-0310-9a29-db15c13687c0>2007-08-09 09:41:25 +0000
commitd2f2bc0ee4a4f2895452b5ab318eb5e6df7fff6b (patch)
tree4cdf73996f198cdca6038a06b1c8e294250c9592
parentada960be3aed0610e8f9311b6b4c4c3f26254611 (diff)
downloadpuppet-d2f2bc0ee4a4f2895452b5ab318eb5e6df7fff6b.tar.gz
puppet-d2f2bc0ee4a4f2895452b5ab318eb5e6df7fff6b.tar.xz
puppet-d2f2bc0ee4a4f2895452b5ab318eb5e6df7fff6b.zip
Trivial mock cleanups
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2763 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xtest/certmgr/inventory.rb4
-rwxr-xr-xtest/network/xmlrpc/processor.rb3
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)