Skip to content

Minitest v6#321

Merged
3v0k4 merged 5 commits intomainfrom
minitest6
Dec 29, 2025
Merged

Minitest v6#321
3v0k4 merged 5 commits intomainfrom
minitest6

Conversation

@3v0k4
Copy link
Copy Markdown
Contributor

@3v0k4 3v0k4 commented Dec 23, 2025

Description

Minitest::Test does not expose the following method anymore:

# https://github.com/minitest/minitest/blob/v5.27.0/lib/minitest/test.rb#L15C1-L17C8

def class_name # :nodoc:
  self.class.name # for Minitest::Reportable
end

which makes obj.location explode with raise NotImplementedError, "subclass responsibility":

# https://github.com/minitest/minitest/blob/v6.0.0/lib/minitest.rb#L615C1-L622C8

def location
  loc = " [#{self.failure.location.delete_prefix BASE_DIR}]" unless passed? or error?
  "#{self.class_name}##{self.name}#{loc}"
end

def class_name # :nodoc:
  raise NotImplementedError, "subclass responsibility"
end

Also, this fixes a problem where we detected the wrong file. Example: rails-app-with-knapsack_pro/test/test_helper.rb instead of rails-app-with-knapsack_pro/test/minitest_shared_examples/shared_examples_test.rb.

Checks

  • I added the changes to the UNRELEASED section of the CHANGELOG.md, including the needed bump (i.e., patch, minor, major)
  • I followed the architecture outlined below for RSpec in Queue Mode:
    • Pure: lib/knapsack_pro/pure/queue/rspec_pure.rb contains pure functions that are unit tested.
    • Extension: lib/knapsack_pro/extensions/rspec_extension.rb encapsulates calls to RSpec internals and is integration and E2E tested.
    • Runner: lib/knapsack_pro/runners/queue/rspec_runner.rb invokes the pure code and the extension to produce side effects, which are integration and E2E tested.

Copy link
Copy Markdown
Member

@ArturT ArturT left a comment

Choose a reason for hiding this comment

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

I assume you

Comment thread rails-app-with-knapsack_pro/Gemfile
@3v0k4
Copy link
Copy Markdown
Contributor Author

3v0k4 commented Dec 29, 2025

I assume you

Is a part of the comment missing @ArturT ?

@3v0k4 3v0k4 merged commit 3354b83 into main Dec 29, 2025
3 of 25 checks passed
@3v0k4 3v0k4 deleted the minitest6 branch December 29, 2025 08:31
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Dec 29, 2025

I assume you

Is a part of the comment missing @ArturT ?

Yes, it seems so. Please ignore it. You answered already here 9011ac3#r2651440284

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