Class: Restspec::HeaderTests::MatchesTest
- Inherits:
-
Struct
- Object
- Struct
- Restspec::HeaderTests::MatchesTest
- Defined in:
- lib/restspec/rspec/matchers/have_header.rb
Instance Attribute Summary collapse
-
#expected_header_regex ⇒ Object
Returns the value of attribute expected_header_regex.
Instance Method Summary collapse
Instance Attribute Details
#expected_header_regex ⇒ Object
Returns the value of attribute expected_header_regex
42 43 44 |
# File 'lib/restspec/rspec/matchers/have_header.rb', line 42 def expected_header_regex @expected_header_regex end |
Instance Method Details
#perform(key, headers) ⇒ Object
43 44 45 |
# File 'lib/restspec/rspec/matchers/have_header.rb', line 43 def perform(key, headers) headers.fetch(key).match(expected_header_regex).present? end |