[GH-7092] Add Rubyzen tests, documentation, GitHub Action, skills, and copilot instructions#24
Conversation
…d copilot instructions
There was a problem hiding this comment.
Pull request overview
Adds a full unit-test suite and supporting documentation/CI for Rubyzen’s public API, including matcher enhancements and deprecation guidance for legacy matcher usage.
Changes:
- Add RSpec unit tests for Rubyzen declarations, providers, collections, cache, configuration, and matchers.
- Expand YARD-style documentation across Rubyzen core types and add
yardas a dependency. - Replace legacy GitHub Action workflow with a dedicated unit-test workflow for PRs.
Reviewed changes
Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/support/parse_helper.rb | Adds a parse_ruby helper for unit tests and includes it in RSpec config. |
| spec/spec_helper.rb | Loads Rubyzen and test support, sets RSpec formatter. |
| spec/rspec/rspec_config_spec.rb | Adds subprocess specs for the RSpec expect override behavior. |
| spec/project_spec.rb | Adds coverage for Rubyzen::Project file/class/module enumeration and path arrays. |
| spec/parsers/ast_parser_spec.rb | Adds coverage for singleton parser behavior and parse success/failure. |
| spec/matchers/be_true_matcher_spec.rb | Adds unit tests for be_true matcher (baseline/allowlist/custom message). |
| spec/matchers/be_false_matcher_spec.rb | Adds unit tests for be_false matcher (baseline/allowlist/custom message). |
| spec/matchers/be_empty_with_exceptions_matcher_spec.rb | Adds unit tests for deprecated matcher behavior + deprecation output. |
| spec/matchers/be_empty_matcher_spec.rb | Adds unit tests for be_empty including baseline/allowlist cases. |
| spec/fixtures/models/sample_model.rb | Adds fixture model file for Project integration tests. |
| spec/fixtures/controllers/sample_controller.rb | Adds fixture controller file for Project integration tests. |
| spec/declarations/rescue_declaration_spec.rb | Adds tests for RescueDeclaration APIs and providers. |
| spec/declarations/require_declaration_spec.rb | Adds tests for RequireDeclaration APIs and providers. |
| spec/declarations/raise_declaration_spec.rb | Adds tests for RaiseDeclaration APIs and providers. |
| spec/declarations/parameter_declaration_spec.rb | Adds tests for ParameterDeclaration APIs and providers. |
| spec/declarations/module_declaration_spec.rb | Adds tests for ModuleDeclaration APIs and nested structure behavior. |
| spec/declarations/method_declaration_spec.rb | Adds tests for MethodDeclaration APIs (parameters, calls, blocks, visibility, etc.). |
| spec/declarations/macro_declaration_spec.rb | Adds tests for MacroDeclaration APIs (symbols/strings/keyword args/receiver). |
| spec/declarations/if_statement_declaration_spec.rb | Adds tests for IfStatementDeclaration APIs and providers. |
| spec/declarations/file_declaration_spec.rb | Adds tests for FileDeclaration APIs and provider-driven accessors. |
| spec/declarations/constant_declaration_spec.rb | Adds tests for ConstantDeclaration APIs and scoping helpers. |
| spec/declarations/class_declaration_spec.rb | Adds tests for ClassDeclaration APIs and provider-driven accessors. |
| spec/declarations/call_site_declaration_spec.rb | Adds tests for CallSiteDeclaration APIs (receiver/args/source/line). |
| spec/declarations/block_declaration_spec.rb | Adds tests for BlockDeclaration APIs and nested providers (rescues/raises/calls). |
| spec/declarations/attribute_declaration_spec.rb | Adds tests for AttributeDeclaration APIs including visibility. |
| spec/configuration_spec.rb | Adds tests for env-driven configuration parsing and error cases. |
| spec/collections/rescues_collection_spec.rb | Adds tests for RescuesCollection filtering. |
| spec/collections/requires_collection_spec.rb | Adds tests for RequiresCollection filtering and name filters. |
| spec/collections/raises_collection_spec.rb | Adds tests for RaisesCollection filtering. |
| spec/collections/parameters_collection_spec.rb | Adds tests for ParametersCollection name filtering. |
| spec/collections/modules_collection_spec.rb | Adds tests for ModulesCollection aggregation and filtering. |
| spec/collections/methods_collection_spec.rb | Adds tests for MethodsCollection aggregation (params/calls/raises/rescues). |
| spec/collections/macros_collection_spec.rb | Adds tests for MacrosCollection name filtering. |
| spec/collections/file_collection_spec.rb | Adds tests for FileCollection path filtering + aggregated accessors. |
| spec/collections/constants_collection_spec.rb | Adds tests for ConstantsCollection name filtering. |
| spec/collections/classes_collection_spec.rb | Adds tests for ClassesCollection aggregation and inheritance/macro filters. |
| spec/collections/call_site_collection_spec.rb | Adds tests for CallSiteCollection receiver/name/arg filters. |
| spec/collections/blocks_collection_spec.rb | Adds tests for BlocksCollection method-name filtering and call aggregation. |
| spec/collections/base_collection_spec.rb | Adds tests for BaseCollection#filter + select/reject being undefined. |
| spec/collections/attributes_collection_spec.rb | Adds tests for AttributesCollection reader/writer/accessor filters. |
| spec/cache/parse_cache_spec.rb | Adds tests for cache hit/miss and invalidation on content change. |
| sample_project/spec/matchers/be_true_matcher_spec.rb | Removes sample-project matcher spec in favor of Rubyzen unit tests. |
| sample_project/spec/matchers/be_empty_matcher_spec.rb | Removes sample-project matcher spec in favor of Rubyzen unit tests. |
| lib/rubyzen/rspec/rspec_config.rb | Adds documentation for RSpec expect override intent/behavior. |
| lib/rubyzen/providers/visibility_provider.rb | Adds YARD docs for visibility helpers. |
| lib/rubyzen/providers/source_code_provider.rb | Adds YARD docs for source_code. |
| lib/rubyzen/providers/rescues_provider.rb | Adds YARD docs for rescues provider. |
| lib/rubyzen/providers/requires_provider.rb | Adds YARD docs for requires provider. |
| lib/rubyzen/providers/raises_provider.rb | Adds YARD docs for raises provider. |
| lib/rubyzen/providers/macros_provider.rb | Adds YARD docs for macros provider. |
| lib/rubyzen/providers/lines_of_code_provider.rb | Adds YARD docs for LOC provider. |
| lib/rubyzen/providers/line_number_provider.rb | Adds YARD docs for line-number provider. |
| lib/rubyzen/providers/if_statements_provider.rb | Adds YARD docs for if-statements provider. |
| lib/rubyzen/providers/file_path_provider.rb | Adds YARD docs for file-path provider. |
| lib/rubyzen/providers/constants_provider.rb | Adds YARD docs for constants provider. |
| lib/rubyzen/providers/collection_filter_provider.rb | Adds YARD docs for collection name filtering API. |
| lib/rubyzen/providers/class_name_provider.rb | Adds YARD docs for class-name provider. |
| lib/rubyzen/providers/call_site_provider.rb | Adds YARD docs for call-site provider. |
| lib/rubyzen/providers/blocks_provider.rb | Adds YARD docs for blocks provider. |
| lib/rubyzen/providers/attributes_provider.rb | Adds YARD docs for attributes provider. |
| lib/rubyzen/project.rb | Adds top-level docs and YARD docs for main API methods. |
| lib/rubyzen/parsers/a_s_t_parser.rb | Adds YARD docs for parser singleton and parse_file. |
| lib/rubyzen/matchers/matcher_helpers.rb | Adds extensive YARD docs for helper behavior and failure formatting. |
| lib/rubyzen/matchers/be_true_matcher.rb | Updates negated failure message and adds YARD docs/examples. |
| lib/rubyzen/matchers/be_false_matcher.rb | Extends matcher to support allowlist/baseline and improves messaging/docs. |
| lib/rubyzen/matchers/be_empty_with_exceptions_matcher.rb | Deprecates matcher and delegates to be_empty with warning. |
| lib/rubyzen/matchers/be_empty_matcher.rb | Adds YARD docs/examples and supports allowlist/baseline. |
| lib/rubyzen/declarations/rescue_declaration.rb | Adds YARD docs and clarifies attributes. |
| lib/rubyzen/declarations/require_declaration.rb | Adds YARD docs and clarifies attributes. |
| lib/rubyzen/declarations/raise_declaration.rb | Adds YARD docs and clarifies attributes. |
| lib/rubyzen/declarations/parameter_declaration.rb | Adds YARD docs and clarifies attributes. |
| lib/rubyzen/declarations/module_declaration.rb | Adds YARD docs for module declaration APIs. |
| lib/rubyzen/declarations/method_declaration.rb | Adds YARD docs for method declaration APIs. |
| lib/rubyzen/declarations/macro_declaration.rb | Adds YARD docs for macro declaration APIs. |
| lib/rubyzen/declarations/if_statement_declaration.rb | Adds YARD docs for if-statement declaration APIs. |
| lib/rubyzen/declarations/file_declaration.rb | Adds YARD docs for file declaration APIs. |
| lib/rubyzen/declarations/constant_declaration.rb | Adds YARD docs for constant declaration APIs and scoping helpers. |
| lib/rubyzen/declarations/class_declaration.rb | Adds YARD docs for class declaration APIs. |
| lib/rubyzen/declarations/call_site_declaration.rb | Adds YARD docs for call-site declaration APIs. |
| lib/rubyzen/declarations/block_declaration.rb | Adds YARD docs for block declaration APIs. |
| lib/rubyzen/declarations/attribute_declaration.rb | Adds YARD docs for attribute declaration APIs. |
| lib/rubyzen/collections/rescues_collection.rb | Adds YARD docs for rescues collection filtering. |
| lib/rubyzen/collections/requires_collection.rb | Adds YARD docs for requires collection filtering. |
| lib/rubyzen/collections/raises_collection.rb | Adds YARD docs for raises collection filtering. |
| lib/rubyzen/collections/parameters_collection.rb | Adds YARD docs for parameters collection. |
| lib/rubyzen/collections/modules_collection.rb | Adds YARD docs for modules collection aggregation. |
| lib/rubyzen/collections/methods_collection.rb | Adds YARD docs for methods collection aggregation. |
| lib/rubyzen/collections/macros_collection.rb | Adds YARD docs for macros collection. |
| lib/rubyzen/collections/file_collection.rb | Adds YARD docs for file collection navigation/aggregation. |
| lib/rubyzen/collections/declaration_collection.rb | Adds YARD docs for generic declaration collection. |
| lib/rubyzen/collections/constants_collection.rb | Adds YARD docs for constants collection. |
| lib/rubyzen/collections/classes_collection.rb | Adds YARD docs for classes collection aggregation and filters. |
| lib/rubyzen/collections/call_site_collection.rb | Adds YARD docs for call-site collection filters. |
| lib/rubyzen/collections/blocks_collection.rb | Adds YARD docs for blocks collection filters/aggregation. |
| lib/rubyzen/collections/base_collection.rb | Adds YARD docs for filter and Array behavior constraints. |
| lib/rubyzen/collections/attributes_collection.rb | Adds YARD docs for attributes collection filters. |
| lib/rubyzen/cache/parse_cache.rb | Adds YARD docs for parse cache behavior. |
| lib/rubyzen.rb | Adds top-level library documentation and improves configuration docs. |
| Gemfile.lock | Adds yard dependency resolution to the lockfile. |
| Gemfile | Adds yard gem dependency. |
| CLAUDE.md | Replaces prior content with expanded Rubyzen architecture and testing guide. |
| .github/workflows/tests.yml | Adds PR CI workflow to run Rubyzen unit tests. |
| .github/workflows/rubyzen-analysis.yml | Removes legacy sample-project Rubyzen analysis workflow. |
| .claude/skills/write-lint-rule/SKILL.md | Adds Claude skill doc for authoring lint rules with Rubyzen. |
| .claude/skills/expand-rubyzen/SKILL.md | Adds Claude skill doc for adding new Rubyzen concepts end-to-end. |
| .claude/skills/add-rubyzen-tests/SKILL.md | Adds Claude skill doc for writing Rubyzen unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 109 out of 110 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 109 out of 110 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 110 out of 111 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 112 out of 113 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
be_falsematcher withbaselineexpand-rubyzenSKILL.mdadd-rubyzen-testsSKILL.mdrun-testsSKILL.mdwrite-lint-ruleSKILL.mdrun-lint-rulesSKILL.mdcopilot-instructions.mdfor the Copilot code review