Sha256: d83906d7bfe17dc83e3bbd77d7f8103853267f783d8cbf3d466ac7b43d6eb65e

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

require 'rest-more/test'

describe RC::Facebook do
  after do
    WebMock.reset!
    RR.verify
  end

  should 'respect timeout' do
    stub_request(:get, 'https://graph.facebook.com/me').
      to_return(:body => '{}')
    mock.proxy(Timeout).timeout(numeric)
    RC::Facebook.new.get('me').should.eq({})
  end

  should 'override timeout' do
    mock(Timeout).timeout(99){ {RC::Facebook::RESPONSE_BODY => true} }
    RC::Facebook.new(:timeout => 1).get('me', {}, :timeout => 99).
      should.eq true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest-more-1.0.2 test/facebook/test_timeout.rb
rest-more-1.0.1 test/facebook/test_timeout.rb
rest-more-1.0.0 test/facebook/test_timeout.rb
rest-more-0.8.0 test/client/facebook/test_timeout.rb
rest-more-0.7.2.1 test/client/facebook/test_timeout.rb
rest-more-0.7.2 test/client/facebook/test_timeout.rb