public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Hongli Lai (Phusion) (author)
Thu May 01 08:42:33 -0700 2008
passenger / test / abstract_server_spec.rb
100644 18 lines (16 sloc) 0.521 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
shared_examples_for "AbstractServer" do
  it "should not crash if it's started and stopped multiple times" do
    3.times do
      # Give the server some time to install the
      # signal handlers. If we don't give it enough
      # time, it will raise an ugly exception when
      # we send it a signal.
      sleep 0.1
      @server.stop
      @server.start
    end
  end
  
  it "should raise a ServerAlreadyStarted if the server is already started" do
    lambda { @server.start }.should raise_error(AbstractServer::ServerAlreadyStarted)
  end
end