File: server_spec.rb

package info (click to toggle)
ruby-excon 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,240 kB
  • sloc: ruby: 7,970; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'spec_helper'

describe Excon::Test::Server do

  context 'when the web server is webrick' do
    it_should_behave_like "a excon test server", :webrick, 'basic.ru'
  end


  context 'when the web server is unicorn' do 
    context 'bound to a tcp socket' do
      it_should_behave_like "a excon test server", :unicorn, 'streaming.ru'
    end

    context "bound to a unix socket" do
      socket_uri = 'unix:///tmp/unicorn.socket'
      it_should_behave_like "a excon test server", :unicorn, 'streaming.ru', socket_uri
    end
  end

  context 'when the web server is puma' do
    it_should_behave_like "a excon test server", :puma, 'streaming.ru'
  end

  context 'when the web server is a executable' do
    it_should_behave_like "a excon test server", :exec, 'good_ipv4.rb'
  end
end