Class: RailsArchitect::Analyzers::TddAnalyzer
- Inherits:
-
Object
- Object
- RailsArchitect::Analyzers::TddAnalyzer
- Defined in:
- lib/rails_architect/analyzers/tdd_analyzer.rb
Overview
Analyzes test-driven development coverage and practices
Instance Attribute Summary collapse
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
Instance Method Summary collapse
- #analyze ⇒ Object
-
#initialize(project_path = Rails.root) ⇒ TddAnalyzer
constructor
A new instance of TddAnalyzer.
Constructor Details
#initialize(project_path = Rails.root) ⇒ TddAnalyzer
9 10 11 |
# File 'lib/rails_architect/analyzers/tdd_analyzer.rb', line 9 def initialize(project_path = Rails.root) @project_path = project_path end |
Instance Attribute Details
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
7 8 9 |
# File 'lib/rails_architect/analyzers/tdd_analyzer.rb', line 7 def project_path @project_path end |
Instance Method Details
#analyze ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails_architect/analyzers/tdd_analyzer.rb', line 13 def analyze { score: calculate_coverage_score, test_files: count_test_files, spec_files: count_spec_files, coverage_percentage: estimate_coverage, suggestions: generate_suggestions, test_structure: analyze_test_structure } end |