Skip to content

Conversation

@3v0k4
Copy link
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.

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