Skip to content

Conversation

@dafyddcrosby
Copy link
Contributor

Summary:
Add test coverage for Bookworm library modules. Creates a new spec/lib/
directory with tests for:

  • parsers/rubocop.rb - AST parsing and EMPTY_RUBOCOP_AST handling
  • parsers/json.rb - JSON parsing
  • parser_base.rb - Abstract base class error behavior
  • exceptions.rb - ClassLoadError exception
  • keys.rb - BOOKWORM_KEYS structure and defaults
  • infer_base_classes.rb - InferRule class and load_rule_class methods
  • infer_engine.rb - Rule processing against KnowledgeBase
  • report_builder.rb - BaseReport class and load_report_class methods
  • crawler.rb - File discovery and parsing (mocked filesystem)
  • configuration.rb - Configuration loading (mocked filesystem)

Also expands knowledge_base_spec.rb with tests for resources, providers,
recipejson, metadatajson, accessors, and edge cases.

Total: 95 tests, all passing.

Differential Revision: D90409494

Summary:
Add test coverage for Bookworm library modules. Creates a new spec/lib/
directory with tests for:

- parsers/rubocop.rb - AST parsing and EMPTY_RUBOCOP_AST handling
- parsers/json.rb - JSON parsing
- parser_base.rb - Abstract base class error behavior
- exceptions.rb - ClassLoadError exception
- keys.rb - BOOKWORM_KEYS structure and defaults
- infer_base_classes.rb - InferRule class and load_rule_class methods
- infer_engine.rb - Rule processing against KnowledgeBase
- report_builder.rb - BaseReport class and load_report_class methods
- crawler.rb - File discovery and parsing (mocked filesystem)
- configuration.rb - Configuration loading (mocked filesystem)

Also expands knowledge_base_spec.rb with tests for resources, providers,
recipejson, metadatajson, accessors, and edge cases.

Total: 95 tests, all passing.

Differential Revision: D90409494
@meta-cla meta-cla bot added the cla signed label Jan 9, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 9, 2026

@dafyddcrosby has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90409494.

@meta-codesync
Copy link

meta-codesync bot commented Jan 12, 2026

This pull request has been merged in 73d8542.

meta-codesync bot pushed a commit to facebook/chef-cookbooks that referenced this pull request Jan 12, 2026
Summary:
X-link: facebook/bookworm#11

Add test coverage for Bookworm library modules. Creates a new spec/lib/
directory with tests for:

- parsers/rubocop.rb - AST parsing and EMPTY_RUBOCOP_AST handling
- parsers/json.rb - JSON parsing
- parser_base.rb - Abstract base class error behavior
- exceptions.rb - ClassLoadError exception
- keys.rb - BOOKWORM_KEYS structure and defaults
- infer_base_classes.rb - InferRule class and load_rule_class methods
- infer_engine.rb - Rule processing against KnowledgeBase
- report_builder.rb - BaseReport class and load_report_class methods
- crawler.rb - File discovery and parsing (mocked filesystem)
- configuration.rb - Configuration loading (mocked filesystem)

Also expands knowledge_base_spec.rb with tests for resources, providers,
recipejson, metadatajson, accessors, and edge cases.

Total: 95 tests, all passing.

Reviewed By: skywalk7

Differential Revision: D90409494

fbshipit-source-id: a1aafee51fc6c42aa93d1e1c2a14b2b040248d10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants