1 require File.dirname(__FILE__) + '/../spec_helper'
3 describe Server, 'with threads' do
6 start_server DEFAULT_TEST_ADDRESS, DEFAULT_TEST_PORT, :threaded => true do |env|
7 sleep env['PATH_INFO'].delete('/').to_i
9 [200, { 'Content-Type' => 'text/html' }, 'hi']
13 it "should process request" do
14 get('/').should_not be_empty
17 it "should process requests when blocked" do
18 slow_request = Thread.new { get('/3') }
19 get('/').should_not be_empty