class Rack::Test::CookieJar
def merge(raw_cookies, uri = nil)
if the cookie is valid for the given URI.
Add a string of raw cookie information to the cookie jar,
def merge(raw_cookies, uri = nil) return unless raw_cookies raw_cookies = raw_cookies.split("\n") if raw_cookies.is_a? String raw_cookies.each do |raw_cookie| next if raw_cookie.empty? cookie = Cookie.new(raw_cookie, uri, @default_host) self << cookie if cookie.valid?(uri) end end