-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(set): improve Set class documentation and error handling
- Add comprehensive documentation for Set class methods and use cases - Add new match? method for conditional testing without process exit - Add missing_subject_block error for better error handling - Improve code organization and method naming - Add detailed type documentation for specifications array - Enhance method documentation with more examples
- Loading branch information
Showing
4 changed files
with
118 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
fix (0.19) | ||
fix (0.20) | ||
defi (~> 3.0.1) | ||
matchi (~> 4.1.1) | ||
spectus (~> 5.0.2) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.19 | ||
0.20 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Fix | ||
module Error | ||
# Error raised when attempting to test a specification without providing a subject block | ||
class MissingSubjectBlock < ::ArgumentError | ||
MISSING_BLOCK_ERROR = "Subject block is required for testing a specification. " \ | ||
"Use: test { subject } or match? { subject }" | ||
|
||
def initialize | ||
super(MISSING_BLOCK_ERROR) | ||
end | ||
end | ||
end | ||
end |
This file contains 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