Class: RubynCode::SelfTest

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyn_code/self_test.rb

Overview

Programmatic smoke test that exercises every major subsystem. Mirrors the checks in skills/rubyn_self_test.md but runs without the REPL or an LLM — suitable for CI and rake tasks.

rubocop:disable Metrics/ClassLength – intentionally comprehensive

Defined Under Namespace

Classes: Result

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_root: Dir.pwd) ⇒ SelfTest

Returns a new instance of SelfTest.



16
17
18
19
# File 'lib/rubyn_code/self_test.rb', line 16

def initialize(project_root: Dir.pwd)
  @project_root = project_root
  @results = []
end

Instance Attribute Details

#project_rootObject (readonly)

Returns the value of attribute project_root.



14
15
16
# File 'lib/rubyn_code/self_test.rb', line 14

def project_root
  @project_root
end

#resultsObject (readonly)

Returns the value of attribute results.



14
15
16
# File 'lib/rubyn_code/self_test.rb', line 14

def results
  @results
end

Instance Method Details

#run!Object

rubocop:disable Naming/PredicateMethod – returns bool but primary purpose is side effects



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rubyn_code/self_test.rb', line 21

def run! # rubocop:disable Naming/PredicateMethod -- returns bool but primary purpose is side effects
  @results = []

  check_file_operations
  check_search
  check_bash
  check_git
  check_specs
  check_compressor_strategies
  check_skills
  check_config
  check_codebase_index
  check_slash_commands
  check_architecture

  print_scorecard
  results.all?(&:passed)
end