diff options
| author | Rick Bradley <rick@rickbradley.com> | 2007-10-16 10:15:14 -0500 |
|---|---|---|
| committer | Rick Bradley <rick@rickbradley.com> | 2007-10-16 10:15:14 -0500 |
| commit | c06edda4c94ef9aa685ed44d7031bb39c4a2b0cc (patch) | |
| tree | c8fedbe14686ac205c212258ac526cd6483982c8 /spec/unit/network/http/webrick.rb | |
| parent | ab4c7fa825e0d1f702adc215c7ff6d445d3b6559 (diff) | |
| download | puppet-c06edda4c94ef9aa685ed44d7031bb39c4a2b0cc.tar.gz puppet-c06edda4c94ef9aa685ed44d7031bb39c4a2b0cc.tar.xz puppet-c06edda4c94ef9aa685ed44d7031bb39c4a2b0cc.zip | |
First pass through initializers of {mongrel, webrick} REST handlers; hooks into Indirection to look up models from indirected names.
Diffstat (limited to 'spec/unit/network/http/webrick.rb')
| -rw-r--r-- | spec/unit/network/http/webrick.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb index 81b2a0fa9..4bf742b6e 100644 --- a/spec/unit/network/http/webrick.rb +++ b/spec/unit/network/http/webrick.rb @@ -64,11 +64,9 @@ 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}]") - @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 + mock_handler_class.expects(:new).with {|args| + args[:server] == @mock_webrick and args[:handlers] == @listen_params[:handlers] + }.returns(mock_handler) @server.expects(:class_for_protocol).with(protocol).at_least_once.returns(mock_handler_class) end @server.listen(@listen_params) |
