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

JBuilder Template Test failing on CI #540

Closed
stefannibrasil opened this issue Oct 7, 2022 · 5 comments · Fixed by rails/rails#46298
Closed

JBuilder Template Test failing on CI #540

stefannibrasil opened this issue Oct 7, 2022 · 5 comments · Fixed by rails/rails#46298

Comments

@stefannibrasil
Copy link

The CI is returning the following error for Ruby >= 2.7:

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

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

The CI is failing even when no code changes were made. I don't have a lot of context about JBuilder and can't provide more details. I hope opening an Issue is okay. Thanks!

@hahmed
Copy link
Contributor

hahmed commented Oct 14, 2022

Thanks @stefannibrasil for reporting this issue. The issue relates to upstream rails, a change on that end caused jbuilder to break.

I did a git bisect and it looks related to the changes in rails/rails#45614

@stefannibrasil
Copy link
Author

hi @hahmed thank you for doing that! I'm not sure what would be the next step. Perhaps creating an issue on Rails? Thank you!

@hahmed
Copy link
Contributor

hahmed commented Oct 21, 2022

So it looks like the rails commit is something we want to keep, which means jbuilder tests will need fixing.

I tested jbuilder in an app and it looks to be working fine, it's only the tests. Specifically the way it's setup to use ActionView.

@casperisfine
Copy link

So rails/rails#46298 makes the jbuilder test suite pass on rails_head.

I'm waiting to see if it doesn't break anything on the Rails side though. The Action View test suite passes, but that doesn't mean a lot.

@stefannibrasil
Copy link
Author

thank you, @casperisfine 🎉

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 a pull request may close this issue.

3 participants