We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcf9378 commit 4c76c40Copy full SHA for 4c76c40
lib/rspec_api_documentation/dsl/endpoint.rb
@@ -63,11 +63,11 @@ def params
63
64
def headers
65
return unless example.metadata[:headers]
66
- example.metadata[:headers].inject({}) do |hash, header|
67
- if header[1].is_a?(Symbol)
68
- hash[header[0]] = send(header[1]) if respond_to?(header[1])
+ example.metadata[:headers].inject({}) do |hash, (header, value)|
+ if value.is_a?(Symbol)
+ hash[header] = send(value) if respond_to?(value)
69
else
70
- hash[header[0]] = header[1]
+ hash[header] = value
71
end
72
hash
73
0 commit comments