Sha256: 580226cfdb01bbae8aaaf5f9c84cb78431abc8edfc1ef54ecda065d471d43349
Contents?: true
Size: 590 Bytes
Versions: 5
Compression:
Stored size: 590 Bytes
Contents
if respond_to?(:require_relative, true) require_relative 'common' else require File.dirname(__FILE__) + '/common' end describe RestGraph 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) RestGraph.new.get('me').should == {} end should 'override timeout' do mock(Timeout).timeout(99){ {RestCore::RESPONSE_BODY => true} } RestGraph.new(:timeout => 1).get('me', {}, :timeout => 99).should == true end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rest-core-0.2.3 | test/test_timeout.rb |
rest-core-0.2.2 | test/test_timeout.rb |
rest-core-0.2.1 | test/test_timeout.rb |
rest-core-0.2.0 | test/test_timeout.rb |
rest-core-0.0.1 | test/test_timeout.rb |