Upgrade to Rails 2.2.0

As a side benefit, fix an (non-user-visible) bug in display_s5().
Also fixed a bug where removing orphaned pages did not expire cached summary pages.
This commit is contained in:
Jacques Distler 2008-10-27 01:47:01 -05:00
parent 39348c65c2
commit 7600aef48b
827 changed files with 123652 additions and 11027 deletions

View file

@ -168,12 +168,20 @@ class ConnectionTest < Test::Unit::TestCase
assert_equal 200, response.code
end
uses_mocha('test_timeout') do
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_raises(ActiveResource::TimeoutError) { @conn.get('/people_timeout.xml') }
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
end
@ -185,6 +193,6 @@ class ConnectionTest < Test::Unit::TestCase
end
def handle_response(response)
@conn.send!(:handle_response, response)
@conn.__send__(:handle_response, response)
end
end