Class: RSpecDocumentation::Summary
- Inherits:
-
Object
- Object
- RSpecDocumentation::Summary
- Includes:
- Paintbrush
- Defined in:
- lib/rspec_documentation/summary.rb
Overview
Provides a summary of the test run including details of any failures.
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize(page_collection:, pwd:, started_at:) ⇒ Summary
constructor
A new instance of Summary.
Constructor Details
#initialize(page_collection:, pwd:, started_at:) ⇒ Summary
Returns a new instance of Summary.
8 9 10 11 12 |
# File 'lib/rspec_documentation/summary.rb', line 8 def initialize(page_collection:, pwd:, started_at:) @page_collection = page_collection @pwd = pwd @duration = Time.now.utc - started_at end |
Instance Method Details
#flush ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rspec_documentation/summary.rb', line 14 def flush if page_collection.failures.empty? print_success_summary else print_failure_summary end print_duration_summary nil end |