spec/support/patch/rack/response.rb in sitehub-0.4.7 vs spec/support/patch/rack/response.rb in sitehub-0.4.8
- old
+ new
@@ -11,9 +11,10 @@
def cookie_data(cookie_data_hash)
cookie_data_hash.collect { |key, assigned_data| [key.to_sym, assigned_data] }.to_h
end
def cookie_key_value_array
- header['Set-Cookie'].lines.collect { |line| line.scan(%r{([\.\w]+)=([\.\w/]+)}) }
+ value = header['Set-Cookie'] || ''
+ value.lines.collect { |line| line.scan(%r{([\.\w]+)=([\.\w/]+)}) }
end
end
end