Class: RailsAiBridge::Introspectors::TestIntrospector

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ai_bridge/introspectors/test_introspector.rb

Overview

Discovers test infrastructure: framework, factories/fixtures, system tests, helpers, CI config, coverage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ TestIntrospector

Returns a new instance of TestIntrospector.



10
11
12
# File 'lib/rails_ai_bridge/introspectors/test_introspector.rb', line 10

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



8
9
10
# File 'lib/rails_ai_bridge/introspectors/test_introspector.rb', line 8

def app
  @app
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rails_ai_bridge/introspectors/test_introspector.rb', line 14

def call
  {
    framework: detect_framework,
    factories: detect_factories,
    fixtures: detect_fixtures,
    system_tests: detect_system_tests,
    test_helpers: detect_test_helpers,
    vcr_cassettes: detect_vcr,
    ci_config: detect_ci,
    coverage: detect_coverage
  }
rescue StandardError => error
  { error: error.message }
end