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 Testing configuration for RSpec users #539

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

stefannibrasil
Copy link
Contributor

JBuilder documentation does not guide users to any extra configuration to test the response body of a template.

Searching for "Rspec" in the project, we see that there are lots of closed issues related to this issue.

Although this extra configuration is not related to JBuilder, I believe this is an important thing to have in the documentation. Users clearly need that extra guidance.

Including a note about it in the documentation would save users hours of trying to debug JBuilder, and maintainers hours that could be used on another features.

Opening this PR for a discussion. I am not sure this is the best place to put this note. Any suggestions?

Jbuilder documentation does not guide users to any
extra configuration to test the response body of a
template.

Searching for "Rspec" in the project, we see that
there are lots of closed issues related to this issue.

Although this extra configuration is not related to JBuilder,
I believe this is an important thing to have in the documentation.

Including a note about it in the documentation would
save users hours of trying to debug JBuilder,
and maintainer's hours that could be used on another
features.
@stefannibrasil
Copy link
Contributor Author

It looks like there are some flakey specs:


Failure:
JbuilderTemplateTest#test_supports_the_cached:_true_option [/home/runner/work/jbuilder/jbuilder/test/jbuilder_template_test.rb:313]:
Expected: "Post #5"
  Actual: nil

rails test home/runner/work/jbuilder/jbuilder/test/jbuilder_template_test.rb:309

The CI is failing even when no code changes were made. I opened an issue #540

README.md Outdated Show resolved Hide resolved
Co-authored-by: Cezary Kłos <cezary.klos@gmail.com>
@dhh dhh merged commit 0463bde into rails:main Apr 29, 2024
30 checks passed
that-jill pushed a commit to powerhome/power-web-development-interview that referenced this pull request May 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jbuilder](https://togithub.com/rails/jbuilder)
([changelog](https://togithub.com/rails/jbuilder/releases/tag/v2.12.0))
| `2.11.5` -> `2.12.0` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/jbuilder/2.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/jbuilder/2.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/jbuilder/2.11.5/2.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/jbuilder/2.11.5/2.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>rails/jbuilder (jbuilder)</summary>

###
[`v2.12.0`](https://togithub.com/rails/jbuilder/releases/tag/v2.12.0)

[Compare
Source](https://togithub.com/rails/jbuilder/compare/v2.11.5...v2.12.0)

#### What's Changed

- Use OpenStruct only if available by
[@&#8203;yahonda](https://togithub.com/yahonda) in
[rails/jbuilder#562
- Replace deprecated `ProxyObject` with `BasicObject` by
[@&#8203;Earlopain](https://togithub.com/Earlopain) in
[rails/jbuilder#563
- Avoid loading `ActionController::API` constant by
[@&#8203;nvasilevski](https://togithub.com/nvasilevski) in
[rails/jbuilder#529
- Fixed a bug where
[#&#8203;501](https://togithub.com/rails/jbuilder/issues/501) broke
compatibility with Enumerable by
[@&#8203;yuki24](https://togithub.com/yuki24) in
[rails/jbuilder#531
- Fix namespace issue when generating jbuilder views by
[@&#8203;hahmed](https://togithub.com/hahmed) in
[rails/jbuilder#536
- Remove reliance on ERBTracker from rails by
[@&#8203;HParker](https://togithub.com/HParker) in
[rails/jbuilder#504
- Fix require path of dependency_tracker in railtie.rb by
[@&#8203;jalyna](https://togithub.com/jalyna) in
[rails/jbuilder#552

#### New Contributors

- [@&#8203;nvasilevski](https://togithub.com/nvasilevski) made their
first contribution in
[rails/jbuilder#529
- [@&#8203;okuramasafumi](https://togithub.com/okuramasafumi) made their
first contribution in
[rails/jbuilder#526
- [@&#8203;berkos](https://togithub.com/berkos) made their first
contribution in
[rails/jbuilder#528
- [@&#8203;hahmed](https://togithub.com/hahmed) made their first
contribution in
[rails/jbuilder#536
- [@&#8203;casperisfine](https://togithub.com/casperisfine) made their
first contribution in
[rails/jbuilder#550
- [@&#8203;jalyna](https://togithub.com/jalyna) made their first
contribution in
[rails/jbuilder#552
- [@&#8203;yahonda](https://togithub.com/yahonda) made their first
contribution in
[rails/jbuilder#562
- [@&#8203;Earlopain](https://togithub.com/Earlopain) made their first
contribution in
[rails/jbuilder#563
- [@&#8203;stefannibrasil](https://togithub.com/stefannibrasil) made
their first contribution in
[rails/jbuilder#539

**Full Changelog**:
rails/jbuilder@v2.11.5...v2.12.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/powerhome/power-web-development-interview).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants