diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-16 22:00:38 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-07-17 13:08:33 +1000 |
| commit | 7fa7251e30dfefc95dda6ef82181d4346f36880d (patch) | |
| tree | 38850331af675c3ab7cde7c19e2e226471311f60 /spec/unit/network/http.rb | |
| parent | bdbd992a6f5ff9628682179639923214d09a780c (diff) | |
| download | puppet-7fa7251e30dfefc95dda6ef82181d4346f36880d.tar.gz puppet-7fa7251e30dfefc95dda6ef82181d4346f36880d.tar.xz puppet-7fa7251e30dfefc95dda6ef82181d4346f36880d.zip | |
The mongrel-related tests now run without mongrel.
Here were the main changes necessary:
* Fixed the class loader so it only loads mongrel if it's available.
* Fixed the test runner to skip example groups contained in non-runnable
example groups.
* Fixed the Mongrel tests to use quoted class names instead of constants,
since the constants themselves would be absent.
Signed-off-by: Luke Kanies <luke@madstop.com>
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 |
