We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10128ad + c0f5f78 commit 8821946Copy full SHA for 8821946
spec/support/cookie_jar.rb
@@ -1,15 +1,10 @@
1
# frozen_string_literal: true
2
3
require 'uri'
4
-
5
-module Rack
6
- class MockResponse
7
- def cookie_jar
8
- @cookie_jar ||= Array(headers[Rack::SET_COOKIE]).flat_map { |h| h.split("\n") }.map { |c| Cookie.new(c).to_h }
9
- end
10
+module Spec
+ module Support
11
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
12
- class Cookie
+ class CookieJar
13
attr_reader :attributes
14
15
def initialize(raw)
@@ -52,3 +47,11 @@ def parse_value(attribute, value)
52
47
end
53
48
54
49
50
+
51
+module Rack
+ class MockResponse
+ def cookie_jar
+ @cookie_jar ||= Array(headers[Rack::SET_COOKIE]).flat_map { |h| h.split("\n") }.map { |c| Spec::Support::CookieJar.new(c).to_h }
55
+ end
56
57
+end
0 commit comments