diff options
Diffstat (limited to 'spec/unit/network/http.rb')
| -rwxr-xr-x | spec/unit/network/http.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/unit/network/http.rb b/spec/unit/network/http.rb index 79a0a88d4..1fa025b0b 100755 --- a/spec/unit/network/http.rb +++ b/spec/unit/network/http.rb @@ -12,9 +12,15 @@ describe Puppet::Network::HTTP do Puppet::Network::HTTP.server_class_by_type(:webrick).should be(Puppet::Network::HTTP::WEBrick) end - if Puppet.features.mongrel? - it "should return the mongrel HTTP server class when asked for a mongrel server" do - Puppet::Network::HTTP.server_class_by_type(:mongrel).should be(Puppet::Network::HTTP::Mongrel) + describe "when asked for a mongrel server" do + if Puppet.features.mongrel? + it "should return the mongrel server class" do + Puppet::Network::HTTP.server_class_by_type(:mongrel).should be(Puppet::Network::HTTP::Mongrel) + end + else + it "should fail" do + lambda { Puppet::Network::HTTP.server_class_by_type(:mongrel) }.should raise_error(ArgumentError) + end end end |
