summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2007-10-16 15:56:03 -0500
committerRick Bradley <rick@rickbradley.com>2007-10-16 15:56:03 -0500
commitce349683b76ab9d21f4d89e2ec818c0755848a1d (patch)
tree9d57f4d6afdd960c163673bebec21c5aab2ae382 /spec/unit
parent6cd0f371065da901d8cc3143d8859a389ca87582 (diff)
downloadpuppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.tar.gz
puppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.tar.xz
puppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.zip
Make the actual runtime be more robust when mongrel is not installed.
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/network/http.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/network/http.rb b/spec/unit/network/http.rb
index 450d15487..cb99d4d4c 100644
--- a/spec/unit/network/http.rb
+++ b/spec/unit/network/http.rb
@@ -15,7 +15,12 @@ describe Puppet::Network::HTTP do
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)
end
-
+
+ it "should fail to return the mongrel HTTP server class if mongrel is not available " do
+ Puppet.features.expects(:mongrel?).returns(false)
+ Proc.new { Puppet::Network::HTTP.server_class_by_type(:mongrel) }.should raise_error(ArgumentError)
+ end
+
it "should return an error when asked for an unknown server" do
Proc.new { Puppet::Network::HTTP.server_class_by_type :foo }.should raise_error(ArgumentError)
end