{{ message }}
Add option note#232
Draft
afuno wants to merge 15 commits into
Draft
Conversation
afuno
commented
Jul 14, 2024
Member
A new class named 'Description' has been introduced into the 'DynamicOptions' module within the 'ToolKit' of the 'Servactory' library. This class currently supports initialization with a single option name.
The Servactory's inputs now allow a "description" feature to be included. This includes changes where the option for including descriptive information was introduced in a few classes and attributes. New test and example files were also created to showcase this new implementation.
This commit introduces a new matcher in the test kit, NoteMatcher, for handling the testing of a 'note' attribute. References to the 'description' attribute in various classes and modules, including the input and attribute registration features, have been replaced with 'note'. This change is also reflected in some example code and tests.
The debug print statements in the test file "example1_spec.rb" were removed. These were not necessary for the functionality of the test and only served to clutter the output. The removal of these lines has cleaned up the test and focused it more on its primary purpose.
The changes introduce two new test contexts in the example1_spec.rb file. One context checks if the function properly handles valid inputs, by successfully calling the class with preset attributes. The more significant addition is the test for invalid inputs, which is expected to result in an exception with a specific note.
The 'note' attribute has been added to the outputs in the 'output.rb', 'matchers.rb', and 'dsl.rb' files. This attribute was also added to the test kit for RSpec and incorporated into the relevant tests within the 'example1_spec.rb' file. The examples given in 'example1.rb' have been updated to reflect these changes.
The register method in the registrar.rb file has been adjusted to disable additional rubocop metrics. Beyond the existing CyclomaticComplexity exception, the AbcSize and PerceivedComplexity metrics have now also been deactivated for this method.
…features/SRV-138/note
…features/SRV-138/note
…features/SRV-138/note
…features/SRV-138/note
…features/SRV-138/note
Updated the test expectations to use `contains` for more flexible matching of the output ID. This enhances readability and ensures better alignment with the expected behavior in these test cases.
…features/SRV-138/note
…features/SRV-138/note
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.
