~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to spec/unit/network/http/webrick_spec.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env rspec
2
 
#
3
 
#  Created by Rick Bradley on 2007-10-15.
4
 
#  Copyright (c) 2007. All rights reserved.
5
 
 
6
2
require 'spec_helper'
7
3
require 'puppet/network/handler'
8
4
require 'puppet/network/http'
9
5
require 'puppet/network/http/webrick'
10
6
 
11
 
describe Puppet::Network::HTTP::WEBrick, "after initializing" do
 
7
describe Puppet::Network::HTTP::WEBrick, "after initializing", :unless => Puppet.features.microsoft_windows? do
12
8
  it "should not be listening" do
13
9
    Puppet::Network::HTTP::WEBrick.new.should_not be_listening
14
10
  end
15
11
end
16
12
 
17
 
describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do
 
13
describe Puppet::Network::HTTP::WEBrick, "when turning on listening", :unless => Puppet.features.microsoft_windows? do
18
14
  before do
19
15
    @mock_webrick = stub('webrick', :[] => {}, :listeners => [], :status => :Running)
20
16
    [:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)}
143
139
end
144
140
 
145
141
 
146
 
describe Puppet::Network::HTTP::WEBrick, "when looking up the class to handle a protocol" do
 
142
describe Puppet::Network::HTTP::WEBrick, "when looking up the class to handle a protocol", :unless => Puppet.features.microsoft_windows? do
147
143
  it "should require a protocol" do
148
144
    lambda { Puppet::Network::HTTP::WEBrick.class_for_protocol }.should raise_error(ArgumentError)
149
145
  end
161
157
  end
162
158
end
163
159
 
164
 
describe Puppet::Network::HTTP::WEBrick, "when turning off listening" do
 
160
describe Puppet::Network::HTTP::WEBrick, "when turning off listening", :unless => Puppet.features.microsoft_windows? do
165
161
  before do
166
162
    @mock_webrick = stub('webrick', :[] => {}, :listeners => [], :status => :Running)
167
163
    [:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)}
188
184
  end
189
185
end
190
186
 
191
 
describe Puppet::Network::HTTP::WEBrick do
 
187
describe Puppet::Network::HTTP::WEBrick, :unless => Puppet.features.microsoft_windows? do
192
188
  before do
193
189
    @mock_webrick = stub('webrick', :[] => {})
194
190
    [:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)}