Sha256: 5170bf854fdc712d97627c9e6c4aee26ba2bfde11883cccb6aed711667567ba0

Contents?: true

Size: 578 Bytes

Versions: 48

Compression:

Stored size: 578 Bytes

Contents

require '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

48 entries across 48 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.7.4 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.7.3 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.7.2 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.7.1 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.7.0 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.9 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.8 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.7 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.6 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.5 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.4 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.3 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.2 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.1 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.6.0 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.5.17 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.5.16 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.5.15 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb
classiccms-0.5.14 vendor/bundle/gems/thin-1.3.1/spec/server/unix_socket_spec.rb