Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Call #finish on MockResponses if it's available (Aaron Patterson)

  • Loading branch information...
commit 38fa75d41eb11b259fd06f87e9b15f2b4f8f8b76 1 parent 2add7d8
Bryan Helmkamp brynary authored
Showing with 12 additions and 1 deletion.
  1. +6 −0 History.txt
  2. +6 −1 lib/rack/mock_session.rb
6 History.txt
View
@@ -1,3 +1,9 @@
+== Git
+
+* Bug fixes
+
+ * Call #finish on MockResponses if it's available (Aaron Patterson)
+
== 0.5.7 / 2011-01-01
* Bug fixes
7 lib/rack/mock_session.rb
View
@@ -35,7 +35,12 @@ def request(uri, env)
cookie_jar.merge(last_response.headers["Set-Cookie"], uri)
@after_request.each { |hook| hook.call }
- @last_response
+
+ if @last_response.respond_to?(:finish)
+ @last_response.finish
+ else
+ @last_response
+ end
end
# Return the last request issued in the session. Raises an error if no
Please sign in to comment.
Something went wrong with that request. Please try again.