Increase Inspection Model Test Coverage and Remove Deprecated Method#249
Merged
stefan-burke merged 2 commits intomainfrom Sep 1, 2025
Merged
Conversation
- Added tests for #area and #volume methods covering nil and valid dimensions - Added tests for #un_complete! method to verify state reset and audit logging - Added tests for #each_applicable_assessment to verify yielded assessments and conditional logic - Added tests for #completion_errors to check error messages for missing data - Added tests for #log_audit_action to ensure event logging - Removed deprecated #completion_status method from Inspection model Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
The test for `each_applicable_assessment` was changed to expect a TypeError when no block is given, reflecting the Sorbet signature requirement for a block. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
completion_statusmethod fromInspectionmodelInspectionmodel methods including area, volume, completion status, audit logging, and assessment iterationChanges
Model Updates
completion_statusmethod fromInspectionmodel as it was unusedTest Coverage Enhancements
#areamethod covering nil and valid dimension cases#volumemethod covering nil and valid dimension cases#un_complete!method verifying state reset and audit logging#each_applicable_assessmentmethod verifying correct assessments yielded based on conditions#completion_errorsmethod verifying error messages for missing unit and incomplete fields#log_audit_actionmethod verifying event loggingTest plan
Inspectionmodel🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/2e56a5cb-f8b0-4744-be4e-78403b5d0db0