Skip to content

Rename the the Assert class - #28

Merged
KyleKincer merged 1 commit into
KyleKincer:mainfrom
21johnh21:rename-assert-class
Dec 30, 2025
Merged

Rename the the Assert class#28
KyleKincer merged 1 commit into
KyleKincer:mainfrom
21johnh21:rename-assert-class

Conversation

@21johnh21

@21johnh21 21johnh21 commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Description

This change updates the Assert class to TestAssertions to avoid conflicts with other attributes.

Summary by CodeRabbit

  • Refactor
    • Renamed assertion testing library components and updated related documentation for improved naming consistency across the testing framework.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This PR renames the assertion library file from Assert.4dm to TestAssertion.4dm throughout the codebase. The public entity cs.Assert is renamed to cs.TestAssertion, with all references in the Testing class property type and initialization updated accordingly. No functional or behavioral changes are introduced.

Changes

Cohort / File(s) Summary
Documentation updates
AGENTS.md, CLAUDE.md, docs/guide.md
Updated to reflect the rename of the assertion library file from Assert.4dm to TestAssertion.4dm and the public entity signature change from cs.Assert to cs.TestAssertion.
Source code updates
testing/Project/Sources/Classes/Testing.4dm
Updated the Testing class's assert property type from cs:C1710.Assert to cs:C1710.TestAssertion and updated its initialization to use cs:C1710.TestAssertion.new().

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward, consistent renaming pattern applied across multiple files with no logic changes or behavioral impact
  • All updates align with the single naming change (Assert → TestAssertion)

Possibly related PRs

Poem

🐰 A name change hops through the code,
From Assert to TestAssertion's node—
No logic bent, just clearer sight,
The rabbit's refactor shines so bright! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Rename the the Assert class' accurately summarizes the main change: renaming Assert to TestAssertion across the codebase to avoid conflicts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 16c31c3 and 35786ee.

📒 Files selected for processing (5)
  • AGENTS.md
  • CLAUDE.md
  • docs/guide.md
  • testing/Project/Sources/Classes/TestAssertion.4dm
  • testing/Project/Sources/Classes/Testing.4dm
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-22T13:15:15.427Z
Learning: Applies to testing/Project/Sources/Classes/*Test.4dm : Name test classes so their file names end with "Test.4dm" to enable auto discovery
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Name 4D test classes with the suffix "Test" for auto discovery (e.g., ExampleTest.4dm)
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Name test methods with the prefix "test_" so the framework recognizes and runs them
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Name 4D test classes with the suffix "Test" for auto discovery (e.g., ExampleTest.4dm)

Applied to files:

  • AGENTS.md
  • CLAUDE.md
  • testing/Project/Sources/Classes/Testing.4dm
📚 Learning: 2025-09-22T13:15:15.427Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-22T13:15:15.427Z
Learning: Applies to testing/Project/Sources/Classes/*Test.4dm : Use comment-based tagging with lines like "// #tags: unit, integration, slow" to categorize tests

Applied to files:

  • AGENTS.md
  • CLAUDE.md
  • testing/Project/Sources/Classes/Testing.4dm
📚 Learning: 2025-09-22T13:15:15.427Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-22T13:15:15.427Z
Learning: Applies to testing/Project/Sources/Classes/*Test.4dm : Name test classes so their file names end with "Test.4dm" to enable auto discovery

Applied to files:

  • AGENTS.md
  • CLAUDE.md
  • testing/Project/Sources/Classes/Testing.4dm
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Place 4D test classes under testing/Project/Sources/Classes/ so the framework can discover and run them

Applied to files:

  • AGENTS.md
  • CLAUDE.md
  • testing/Project/Sources/Classes/Testing.4dm
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Name test methods with the prefix "test_" so the framework recognizes and runs them

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Tag integration tests explicitly with "// #tags: integration" (and enable triggers when needed) to support filtering

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-09-22T13:15:15.427Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-22T13:15:15.427Z
Learning: Applies to testing/Project/Sources/Classes/*Test.4dm : Within test classes, name test methods with the prefix "test_" so they are executed by the runner

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : When manual control is required, use Testing context helpers: startTransaction, inTransaction, validateTransaction, cancelTransaction, withTransaction, withTransactionValidate

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-10-20T18:19:46.650Z
Learnt from: CR
Repo: KyleKincer/testing PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-20T18:19:46.650Z
Learning: Applies to testing/Project/Sources/Classes/**/*.4dm : Use comment-based tagging in tests with "// #tags: tag1, tag2" to enable filtering

Applied to files:

  • AGENTS.md
  • CLAUDE.md
🔇 Additional comments (4)
AGENTS.md (1)

120-120: Documentation update looks good!

The project structure correctly reflects the renamed assertion library file from Assert.4dm to TestAssertion.4dm.

CLAUDE.md (1)

119-119: Documentation update is consistent!

The project structure correctly reflects the renamed assertion library file, consistent with the changes in AGENTS.md.

testing/Project/Sources/Classes/Testing.4dm (1)

7-7: Implementation correctly updated for the class rename.

Both the property type declaration (Line 7) and initialization (Line 17) have been updated consistently from cs:C1710.Assert to cs:C1710.TestAssertion. The changes are straightforward and maintain the same functionality.

Also applies to: 17-17

docs/guide.md (1)

711-711: Public API documentation updated correctly.

The Framework Architecture section correctly documents the rename from cs.Assert to cs.TestAssertion. All references to the old class name have been successfully updated throughout the codebase. This is a breaking change for any code that directly references cs.Assert, though most test code uses the $t.assert pattern and remains unaffected.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KyleKincer
KyleKincer merged commit 9671b59 into KyleKincer:main Dec 30, 2025
1 check passed
KyleKincer added a commit that referenced this pull request Dec 30, 2025
This reverts commit 9671b59, reversing
changes made to 16c31c3.
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