Skip to content

Conversation

@zenspider
Copy link
Contributor

@zenspider zenspider commented Nov 20, 2025

This branch contains all the fixes needed for minitest 6 to work smoothly with rails. I've now tested extensively on MT5 as well as MT6.

I have another branch testing out the actual MT6 bump and it still has some sort of flaky going on that I'm investigating.

@zenspider zenspider force-pushed the zenspider__mt6 branch 2 times, most recently from d987d90 to ee31f01 Compare November 20, 2025 22:24
@zenspider zenspider force-pushed the zenspider__mt6 branch 7 times, most recently from 978c7f4 to 5c51421 Compare November 21, 2025 00:12
@zenspider zenspider changed the title DO NOT MERGE: testing out minitest 6 Prepping rails for minitest 6 Nov 21, 2025
@zenspider zenspider marked this pull request as ready for review November 21, 2025 05:14
@zenspider zenspider force-pushed the zenspider__mt6 branch 2 times, most recently from f9b0ff2 to 0e2427a Compare November 21, 2025 21:10
MT6 changes the way assertion messages work. Now, if a proc is passed
in for the message, it wins untouched. So for the rails assertions
that want to have diffs shown while calling assert_equal with a
message proc, the proc needs to call diff itself. This feels redundant
to me, but not my call.

And since the procs win now, they need to provide their own periods at
the end of the text.
Mostly minor and mostly centered around whether there are diffs.
Copy link
Member

@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

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

The changes seem fine, but I have a couple questions. If some of these changes are necessary, I would like to understand why. If they aren't necessary, then maybe remove them from the PR? (I don't actually mind whether or not those changes are there, I just want to know if they are there because of the upgrade to MT6)


test "not being empty when route is added" do
assert_predicate self, :empty?
assert_empty @set
Copy link
Member

Choose a reason for hiding this comment

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

Why do these need to be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because y'all made empty? private and assert_predicate does a send on self. Breaks. assert_empty on @set passes.

rich_message = -> do
code_string = expression.respond_to?(:call) ? _callable_to_source_string(expression) : expression
error = "`#{code_string}` changed"
error = "`#{code_string}` changed."
Copy link
Member

Choose a reason for hiding this comment

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

Are these periods load bearing? Why do they need to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The message helper has gotten a lot simpler/cleaner for MT6 and doesn't end sentences for you anymore. changing the error message to include the period passes on both MT5 and MT6. Otherwise I have to fight versioning on the assert_equal against the message output.

@tenderlove tenderlove merged commit 8ffc9a0 into rails:main Dec 16, 2025
4 checks passed
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.

3 participants