Skip to content

Commit

Permalink
Merge pull request #55 from envato/deprecationWarnings
Browse files Browse the repository at this point in the history
Fix Rack::Response#header deprecation warning
  • Loading branch information
andyjdavis authored Dec 4, 2023
2 parents 68f1e19 + fc0949a commit 974d699
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- Resolved Rack::Response#header deprecation warnings when running rspec

## [0.3.0] - 2023-09-08

### Added
Expand Down
6 changes: 3 additions & 3 deletions spec/rack_middleware_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

it "doesn't include an X-Rack-ECG-Version custom header" do
get "/hello/world"
expect(last_response.header["X-Rack-ECG-Version"]).to(be_nil)
expect(last_response.headers["X-Rack-ECG-Version"]).to(be_nil)
end
end

Expand All @@ -42,7 +42,7 @@

it "includes an X-Rack-ECG-Version custom header" do
get "/_ecg"
expect(last_response.header["X-Rack-ECG-Version"]).to(eq(Rack::ECG::VERSION))
expect(last_response.headers["X-Rack-ECG-Version"]).to(eq(Rack::ECG::VERSION))
end

context "when `at` config option is set" do
Expand All @@ -52,7 +52,7 @@

it "responds from that path" do
get "/health_check"
expect(last_response.header["X-Rack-ECG-Version"]).to(eq(Rack::ECG::VERSION))
expect(last_response.headers["X-Rack-ECG-Version"]).to(eq(Rack::ECG::VERSION))
end
end

Expand Down

0 comments on commit 974d699

Please sign in to comment.