Skip to content

Conversation

@rfletcher
Copy link

Some response headers, like Set-Cookie, can be specified multiple times. That results in an array of values. Calling expect_header or expect_header_contains against one of these headers causes an exception:

Failure/Error: expect_header_contains(:set_cookie, 'foo')
NoMethodError:
  undefined method `downcase' for #<Array:0x007f9d811b64c8>

This patch adds support for headers with multiple values, checking the expectation against each value in the list and passing if any one value passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant