diff options
| author | Rick Bradley <rick@rickbradley.com> | 2007-10-16 10:44:02 -0500 |
|---|---|---|
| committer | Rick Bradley <rick@rickbradley.com> | 2007-10-16 10:44:02 -0500 |
| commit | 3c370b3570d39c18799085793e083898cda72e68 (patch) | |
| tree | 8e8484e399ac006d1afeefbea0a8d50d7d62d4fa /spec/unit/network/http/webrick.rb | |
| parent | c06edda4c94ef9aa685ed44d7031bb39c4a2b0cc (diff) | |
| download | puppet-3c370b3570d39c18799085793e083898cda72e68.tar.gz puppet-3c370b3570d39c18799085793e083898cda72e68.tar.xz puppet-3c370b3570d39c18799085793e083898cda72e68.zip | |
Going back to each server+protocol object being responsible for only one indirection, as the REST vs. XMLRPC models are different enough that the object must register itself on initialization and handle the request when it comes in.
Diffstat (limited to 'spec/unit/network/http/webrick.rb')
| -rw-r--r-- | spec/unit/network/http/webrick.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb index 4bf742b6e..81b2a0fa9 100644 --- a/spec/unit/network/http/webrick.rb +++ b/spec/unit/network/http/webrick.rb @@ -64,9 +64,11 @@ describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do @listen_params[:protocols].each do |protocol| mock_handler = mock("handler instance for [#{protocol}]") mock_handler_class = mock("handler class for [#{protocol}]") - mock_handler_class.expects(:new).with {|args| - args[:server] == @mock_webrick and args[:handlers] == @listen_params[:handlers] - }.returns(mock_handler) + @listen_params[:handlers].each do |handler| + mock_handler_class.expects(:new).with {|args| + args[:server] == @mock_webrick and args[:handler] == handler + }.returns(mock_handler) + end @server.expects(:class_for_protocol).with(protocol).at_least_once.returns(mock_handler_class) end @server.listen(@listen_params) |
