lib/action_controller/test_process.rb in actionpack-1.2.0 vs lib/action_controller/test_process.rb in actionpack-1.3.0

- old
+ new

@@ -180,9 +180,18 @@ # does the specified template object exist? def has_template_object?(name=nil) !template_objects[name].nil? end + + # Returns the response cookies, converted to a Hash of (name => CGI::Cookie) pairs + # Example: + # + # assert_equal ['AuthorOfNewPage'], r.cookies['author'].value + def cookies + headers['cookie'].inject({}) { |hash, cookie| hash[cookie.name] = cookie; hash } + end + end class TestSession #:nodoc: def initialize(attributes = {}) @attributes = attributes \ No newline at end of file