Skip to content

Commit

Permalink
[Specs] Add spec for configure forwards on class methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manfred committed Mar 3, 2014
1 parent f15d79f commit 846b6f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/rest_test.rb
Expand Up @@ -58,4 +58,12 @@
REST.post(uri, body)
REST::Request._performed.last.should == [:post, URI.parse(uri), body, {}, {}]
end

it "forwards configure block to the REST::Request" do
timeout = 342
response = REST.get('http://example.com/resources/2') do |http_request|
http_request.open_timeout = timeout
end
REST::Request._last_http_request.open_timeout.should == timeout
end
end

0 comments on commit 846b6f4

Please sign in to comment.