Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Aug 26, 2025

Motivation and Context

The argument order for assert_equal is expected, actual: https://github.com/minitest/minitest/blob/v5.25.5/lib/minitest/assertions.rb#L214

This PR corrects the arguments that were reversed to the expected order. It also enables Minitest/LiteralAsActualArgument, which can detect and autocorrect some of these cases:
https://docs.rubocop.org/rubocop-minitest/0.38/cops_minitest.html#minitestliteralasactualargument

How Has This Been Tested?

Existing tests have been updated.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

The argument order for `assert_equal` is expected, actual:
https://github.com/minitest/minitest/blob/v5.25.5/lib/minitest/assertions.rb#L214

This PR corrects the arguments that were reversed to the expected order.
It also enables `Minitest/LiteralAsActualArgument`, which can detect and
autocorrect some of these cases:
https://docs.rubocop.org/rubocop-minitest/0.38/cops_minitest.html#minitestliteralasactualargument
@koic koic merged commit aec8fb8 into modelcontextprotocol:main Aug 27, 2025
5 checks passed
@koic koic deleted the tweak_assert_equal_argument_order_in_tests branch August 27, 2025 02:07
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.

2 participants