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

Add Rack::Lint to ActionDispatch::Reloader tests #48846

Merged

Conversation

akhilgkrishnan
Copy link
Member

@akhilgkrishnan akhilgkrishnan commented Jul 29, 2023

Motivation / Background

This adds test coverage to ActionDispatch::Reloader to validate that its behavior conforms to Rack SPEC.

Detail

This adds additional test coverage to ActionDispatch::Loader to validate that its input and output follow the Rack SPEC.

This also removes some tests that were asserting the body object passed to ActionDispatch::Loader and not the Rack SPEC. See also rack/rack#2100.
ref: https://github.com/rails/rails/pull/48825/files#r1275947386

Additional information

https://github.com/skipkayhil/tmp-rails/issues/1

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

cc: @nunosilva800 @skipkayhil

@rails-bot rails-bot bot added the actionpack label Jul 29, 2023
resp[2].close
end
assert_equal 3, i
assert_equal 3, j
end

def test_returned_body_object_behaves_like_underlying_object
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end
body.close
assert close_called
end

def test_returned_body_object_responds_to_all_methods_supported_by_underlying_object
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guilleiguaran guilleiguaran merged commit 127138c into rails:main Jul 30, 2023
9 checks passed
@akhilgkrishnan akhilgkrishnan deleted the add-rack-lint-to-reloader-test branch July 31, 2023 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants