Skip to content

Fix commands for groups inside class in minitest spec style #3517

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

Conversation

domingo2000
Copy link
Contributor

Motivation

Closes #3516

The minitest spec style commands where not resolved correctly inside classes.

Implementation

Instead of using the label of the test groups use the id because the id contains all the information.

Automated Tests

Added 1 tests with the case to run the tests of just a group.

Manual Tests

Tested against this example

# ./spec/some_test.rb
require "minitest/autorun"

class SomeTest < Minitest::Spec
  describe "foo" do
    it "bar" do
      assert true
    end
  end
end

And works fine.

@domingo2000 domingo2000 requested a review from a team as a code owner May 21, 2025 16:53
Copy link

graphite-app bot commented May 21, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@vinistock vinistock added bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels May 21, 2025
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

Nice. Thank you, Domingo!

@vinistock vinistock merged commit 6e217c6 into Shopify:main May 21, 2025
25 checks passed
@domingo2000 domingo2000 deleted the fix/test-groups-inside-class-for-minitest-spec-commands branch May 21, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Describe specs in minitest spec style inside class gives incorrect ids for describe blocks.
2 participants