Module: RspecApiHelpers::Headers

Defined in:
lib/rspec_api_helpers/headers.rb

Instance Method Summary collapse

Instance Method Details

#_headersObject



7
8
9
10
11
12
13
14
# File 'lib/rspec_api_helpers/headers.rb', line 7

def _headers
  headers = OpenStruct.new
  headers.json = {
    'CONTENT_TYPE' => 'application/json',
    'ACCEPT' => 'application/json'
  }
  headers
end

#headers_for(type) ⇒ Object



3
4
5
# File 'lib/rspec_api_helpers/headers.rb', line 3

def headers_for(type)
  _headers.send type
end