File: request_spec.rb

package info (click to toggle)
ruby-rest-client 2.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 860 kB
  • sloc: ruby: 3,844; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
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
29
require_relative '_lib'

describe RestClient::Request do
  before(:all) do
    WebMock.disable!
  end

  after(:all) do
    WebMock.enable!
  end

  describe "ssl verification" do
    # all removed; accessing the network
  end

  describe "timeouts" do
    xit "raises OpenTimeout when it hits an open timeout" do
      request = RestClient::Request.new(
        :method => :get,
        :url => 'http://www.mozilla.org',
        :open_timeout => 1e-10,
      )
      expect { request.execute }.to(
        raise_error(RestClient::Exceptions::OpenTimeout))
    end

  end

end