Sha256: 551bd2930f80e119f6cecee50b775ce6fd7b81ea8f2de9502bc00a1dd85a7eec

Contents?: true

Size: 766 Bytes

Versions: 7

Compression:

Stored size: 766 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')

$NITRO_NO_ENVIRONMENT = true

require 'test/unit'

require 'nitro/server'

class TC_Server < Test::Unit::TestCase # :nodoc: all
  include Nitro
  
  class RootController
  end

  class UsersController
  end
  
  class TestController
  end
  
  class DeepController
  end
  
  def test_all
    srv = Server.new('test')
    
    srv.root = RootController
    srv.root.users = UsersController
    srv.root.test = TestController
    srv.root.really.really.deep = DeepController
    
    assert_equal RootController, srv.map['/']
    assert_equal UsersController, srv.map['/users']
    assert_equal TestController, srv.map['/test']
    assert_equal DeepController, srv.map['/really/really/deep']
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nitro-0.23.0 test/nitro/tc_server.rb
nitro-0.24.0 test/nitro/tc_server.rb
nitro-0.25.0 test/nitro/tc_server.rb
nitro-0.26.0 test/nitro/tc_server.rb
nitro-0.27.0 test/nitro/tc_server.rb
nitro-0.28.0 test/nitro/tc_server.rb
nitro-0.29.0 test/nitro/tc_server.rb