Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix specs for Rack Edge #2404

Closed
ericproulx opened this issue Jan 3, 2024 · 0 comments · Fixed by #2405
Closed

Fix specs for Rack Edge #2404

ericproulx opened this issue Jan 3, 2024 · 0 comments · Fixed by #2405

Comments

@ericproulx
Copy link
Contributor

We need to fix some tests for rack_edge

1) Grape::API format streams the content of the file with stream
     Failure/Error: subject.use Rack::Chunked

     NameError:
       uninitialized constant Rack::Chunked
     # ./spec/grape/api_spec.rb:1255:in `block (3 levels) in <top (required)>'

  2) Grape::Middleware::Base#response when Array header
     Failure/Error: expect(subject.response.header).to have_key(:abc)

     NoMethodError:
       undefined method `header' for an instance of Rack::Response
     # ./spec/grape/middleware/base_spec.rb:96:in `block (4 levels) in <top (required)>'

  3) Grape::Middleware::Base#response when Rack::Response header
     Failure/Error: expect(subject.response.header).to have_key(:abc)

     NoMethodError:
       undefined method `header' for an instance of Rack::Response
     # ./spec/grape/middleware/base_spec.rb:118:in `block (4 levels) in <top (required)>'
ericproulx added a commit to ericproulx/grape that referenced this issue Jan 5, 2024
Replace last_response.headers[Rack::CONTENT_TYPE] by last_response.content_type
Replace last_response.headers['Location'] by last_response.content_type
Replace last_response.headers[Rack::CONTENT_LENGTH] by last_response.content_type
dblock pushed a commit that referenced this issue Jan 6, 2024
* Fix #2403

* Fix #2404
Replace last_response.headers[Rack::CONTENT_TYPE] by last_response.content_type
Replace last_response.headers['Location'] by last_response.content_type
Replace last_response.headers[Rack::CONTENT_LENGTH] by last_response.content_type

* Add CHANGELOG.md entry

* Fix rubocop

* Update CHANGELOG.md

* Remove Rack::Chunked deprecation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants