Sha256: 82fe4dcfa794923de9dc1fd8e101d0f3fa436df31f2f02f3a2d3c9c800360b53

Contents?: true

Size: 764 Bytes

Versions: 29

Compression:

Stored size: 764 Bytes

Contents

require 'test/spec'

require 'rack/handler'

context "Rack::Handler" do
  class Rack::Handler::Lobster; end
  class RockLobster; end

  specify "has registered default handlers" do
    Rack::Handler.get('cgi').should.equal Rack::Handler::CGI
    Rack::Handler.get('fastcgi').should.equal Rack::Handler::FastCGI
    Rack::Handler.get('mongrel').should.equal Rack::Handler::Mongrel
    Rack::Handler.get('webrick').should.equal Rack::Handler::WEBrick
  end

  specify "should get unregistered handler by name" do
    Rack::Handler.get('lobster').should.equal Rack::Handler::Lobster
  end

  specify "should register custom handler" do
    Rack::Handler.register('rock_lobster', 'RockLobster')
    Rack::Handler.get('rock_lobster').should.equal RockLobster
  end
end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/rack/test/spec_rack_handler.rb
kastner-rack-0.3.171 test/spec_rack_handler.rb
kastner-rack-0.3.186 test/spec_rack_handler.rb
masover-castronaut-0.4.4.4 vendor/rack/test/spec_rack_handler.rb
masover-castronaut-0.4.4.5 vendor/rack/test/spec_rack_handler.rb
masover-castronaut-0.5.0.1 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.2.0 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.2.5 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.3.0 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.3.5 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.3.6 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.1 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.2 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.3 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.4 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.5 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.4.6 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.5.0 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.5.1 vendor/rack/test/spec_rack_handler.rb
relevance-castronaut-0.5.2 vendor/rack/test/spec_rack_handler.rb