Class: Restspec::HeaderTests::ContainsTest

Inherits:
Struct
  • Object
show all
Defined in:
lib/restspec/rspec/matchers/have_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expected_header_partObject

Returns the value of attribute expected_header_part

Returns:

  • (Object)

    the current value of expected_header_part



36
37
38
# File 'lib/restspec/rspec/matchers/have_header.rb', line 36

def expected_header_part
  @expected_header_part
end

Instance Method Details

#perform(key, headers) ⇒ Object



37
38
39
# File 'lib/restspec/rspec/matchers/have_header.rb', line 37

def perform(key, headers)
  headers.fetch(key).include? expected_header_part
end