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

Document the assert_turbo_stream helpers #462

Merged
merged 1 commit into from
May 8, 2023

Conversation

seanpdoyle
Copy link
Contributor

First, mention the assert_turbo_stream test helpers in the README.md under a new "Testing" heading.

Next, add method-level documentation to describe each helper's interface.

Finally, separate the ActionDispatch::IntegrationTest portion of the test into a new Turbo::TestAssertions::IntegrationTestAssertions module that's automatically included in
ActionDispatch::IntegrationTest when it's loaded.

By separating the two, the assert_turbo_stream helpers can be invoked outside of an HTTP request test, while still providing a baseline implementation for when an HTTP response is available.

First, mention the `assert_turbo_stream` test helpers in the
[README.md](./README.md) under a new "Testing" heading.

Next, add method-level documentation to describe each helper's
interface.

Finally, separate the `ActionDispatch::IntegrationTest` portion of the
test into a new `Turbo::TestAssertions::IntegrationTestAssertions`
module that's automatically included in
`ActionDispatch::IntegrationTest` when it's loaded.

By separating the two, the `assert_turbo_stream` helpers can be invoked
outside of an HTTP request test, while still providing a baseline
implementation for when an HTTP response is available.
@dhh dhh merged commit ea00f37 into hotwired:main May 8, 2023
@seanpdoyle seanpdoyle deleted the stream-test-assertions branch May 8, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants