Skip to content

Commit

Permalink
Use Rack::Response#headers in place of header
Browse files Browse the repository at this point in the history
Signed-off-by: duffn <3457341+duffn@users.noreply.github.com>
  • Loading branch information
duffn committed Apr 2, 2023
1 parent 1fc94f8 commit f543a3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/prometheus/middleware/exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
get '/metrics', nil, headers

expect(last_response.status).to eql(200)
expect(last_response.header['content-type']).to eql(fmt::CONTENT_TYPE)
expect(last_response.headers['content-type']).to eql(fmt::CONTENT_TYPE)
expect(last_response.body).to eql(fmt.marshal(registry))
end
end
Expand All @@ -47,7 +47,7 @@
get '/metrics', nil, headers

expect(last_response.status).to eql(406)
expect(last_response.header['content-type']).to eql('text/plain')
expect(last_response.headers['content-type']).to eql('text/plain')
expect(last_response.body).to eql(message)
end
end
Expand Down Expand Up @@ -108,7 +108,7 @@
get 'http://example.org:9999/metrics', nil, {}

expect(last_response.status).to eql(200)
expect(last_response.header['content-type']).to eql(text::CONTENT_TYPE)
expect(last_response.headers['content-type']).to eql(text::CONTENT_TYPE)
expect(last_response.body).to eql(text.marshal(registry))
end
end
Expand Down

0 comments on commit f543a3c

Please sign in to comment.