Sha256: 40181fcf2d4b7e38951e879615ad566925b33dd9c54d363588b51be651354fd9

Contents?: true

Size: 607 Bytes

Versions: 35

Compression:

Stored size: 607 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Server, "on UNIX domain socket" do
  before do
    start_server('/tmp/thin_test.sock') do |env|
      [200, { 'Content-Type' => 'text/html' }, [env.inspect]]
    end
  end
  
  it "should accept GET request" do
    get("/?this").should include('this')
  end
  
  it "should retreive remote address" do    
    get('/').should include('"REMOTE_ADDR"=>"127.0.0.1"')
  end
  
  it "should remove socket file after server stops" do
    @server.stop!
    File.exist?('/tmp/thin_test.sock').should be_false
  end
  
  after do
    stop_server
  end
end

Version data entries

35 entries across 35 versions & 6 rubygems

Version Path
grockit-thin-0.8.2 spec/server/unix_socket_spec.rb
macournoyer-thin-1.0.1 spec/server/unix_socket_spec.rb
macournoyer-thin-1.1.0 spec/server/unix_socket_spec.rb
michaelyta-thin-1.2.2 spec/server/unix_socket_spec.rb
thin-1.2.11 spec/server/unix_socket_spec.rb
thin-1.2.11-x86-mswin32 spec/server/unix_socket_spec.rb
thin-1.2.11-x86-mingw32 spec/server/unix_socket_spec.rb
thin-1.2.10 spec/server/unix_socket_spec.rb
thin-1.2.10-x86-mswin32 spec/server/unix_socket_spec.rb
thin-1.2.10-x86-mingw32 spec/server/unix_socket_spec.rb
thin-1.2.9 spec/server/unix_socket_spec.rb
thin-1.2.9-x86-mswin32 spec/server/unix_socket_spec.rb
thin-1.2.9-x86-mingw32 spec/server/unix_socket_spec.rb
thin-1.2.8 spec/server/unix_socket_spec.rb
thin-1.2.8-x86-mswin32 spec/server/unix_socket_spec.rb
thin-1.2.8-x86-mingw32 spec/server/unix_socket_spec.rb
steamcannon-thin-1.2.8 spec/server/unix_socket_spec.rb
thin-1.2.7 spec/server/unix_socket_spec.rb
thin-1.2.7-x86-mswin32 spec/server/unix_socket_spec.rb
thin-1.2.7-x86-mingw32 spec/server/unix_socket_spec.rb