Skip to content

Add custom cop to enforce no class reopening in tests#914

Merged
juniper-shopify merged 1 commit into
mainfrom
juni/Add_cop_to_enforce_no_reopening_classes_in_test_class_hierarchy
Jun 10, 2026
Merged

Add custom cop to enforce no class reopening in tests#914
juniper-shopify merged 1 commit into
mainfrom
juni/Add_cop_to_enforce_no_reopening_classes_in_test_class_hierarchy

Conversation

@juniper-shopify

@juniper-shopify juniper-shopify commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Prevents regression on the pattern fixed in #912.

juniper-shopify commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@juniper-shopify juniper-shopify changed the title Add cop to enforce no reopening classes in test class hierarchy Add custom cop to enforce no class reopening in tests Jun 3, 2026
@juniper-shopify juniper-shopify marked this pull request as ready for review June 3, 2026 15:23
{
(const (const {nil? cbase} :ActiveSupport) :TestCase)
(const (const {nil? cbase} :Minitest) :Test)
(const {nil? cbase} :Minitest)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My understanding is that Minitest is a module, and a class can't inherit a module. In that case, wouldn't this be dead code? Or am I missing something?

@LasmarKhalifa LasmarKhalifa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Put a small comment but definitely not a blocker.

juniper-shopify commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jun 10, 5:18 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 10, 5:22 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 10, 5:22 PM UTC: @juniper-shopify merged this pull request with Graphite.

@juniper-shopify juniper-shopify changed the base branch from juni/Restructure_test_classes_for_better_RubyMine_compatibility to graphite-base/914 June 10, 2026 17:18
@juniper-shopify juniper-shopify changed the base branch from graphite-base/914 to main June 10, 2026 17:20
@juniper-shopify juniper-shopify force-pushed the juni/Add_cop_to_enforce_no_reopening_classes_in_test_class_hierarchy branch from 525e820 to b8bf9ae Compare June 10, 2026 17:21
@juniper-shopify juniper-shopify merged commit fbd5f65 into main Jun 10, 2026
3 checks passed
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.

3 participants