aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/connection_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test/connection_test.rb')
-rw-r--r--activeresource/test/connection_test.rb28
1 files changed, 13 insertions, 15 deletions
diff --git a/activeresource/test/connection_test.rb b/activeresource/test/connection_test.rb
index 84bcf69219..831fbc4003 100644
--- a/activeresource/test/connection_test.rb
+++ b/activeresource/test/connection_test.rb
@@ -168,21 +168,19 @@ class ConnectionTest < Test::Unit::TestCase
assert_equal 200, response.code
end
- uses_mocha('test_timeout, test_accept_http_header') do
- def test_timeout
- @http = mock('new Net::HTTP')
- @conn.expects(:http).returns(@http)
- @http.expects(:get).raises(Timeout::Error, 'execution expired')
- assert_raise(ActiveResource::TimeoutError) { @conn.get('/people_timeout.xml') }
- end
-
- def test_accept_http_header
- @http = mock('new Net::HTTP')
- @conn.expects(:http).returns(@http)
- path = '/people/1.xml'
- @http.expects(:get).with(path, {'Accept' => 'application/xhtml+xml'}).returns(ActiveResource::Response.new(@matz, 200, {'Content-Type' => 'text/xhtml'}))
- assert_nothing_raised(Mocha::ExpectationError) { @conn.get(path, {'Accept' => 'application/xhtml+xml'}) }
- end
+ def test_timeout
+ @http = mock('new Net::HTTP')
+ @conn.expects(:http).returns(@http)
+ @http.expects(:get).raises(Timeout::Error, 'execution expired')
+ assert_raise(ActiveResource::TimeoutError) { @conn.get('/people_timeout.xml') }
+ end
+
+ def test_accept_http_header
+ @http = mock('new Net::HTTP')
+ @conn.expects(:http).returns(@http)
+ path = '/people/1.xml'
+ @http.expects(:get).with(path, {'Accept' => 'application/xhtml+xml'}).returns(ActiveResource::Response.new(@matz, 200, {'Content-Type' => 'text/xhtml'}))
+ assert_nothing_raised(Mocha::ExpectationError) { @conn.get(path, {'Accept' => 'application/xhtml+xml'}) }
end
protected