Class: RspecGithubActionsSummary::ExampleGroup
- Inherits:
-
Object
- Object
- RspecGithubActionsSummary::ExampleGroup
- Defined in:
- lib/rspec_github_actions_summary/example_group.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ ExampleGroup
constructor
A new instance of ExampleGroup.
- #render_failed_examples ⇒ Object
- #write_row ⇒ Object
Constructor Details
permalink #initialize(file_path) ⇒ ExampleGroup
Returns a new instance of ExampleGroup.
7 8 9 |
# File 'lib/rspec_github_actions_summary/example_group.rb', line 7 def initialize(file_path) @file_path = file_path end |
Instance Attribute Details
permalink #file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/rspec_github_actions_summary/example_group.rb', line 5 def file_path @file_path end |
Instance Method Details
permalink #render_failed_examples ⇒ Object
[View source]
22 23 24 25 26 27 28 |
# File 'lib/rspec_github_actions_summary/example_group.rb', line 22 def render_failed_examples return [] if json['failed'].empty? json['failed'].map do |j| "bin/rspec #{j["path"]} # #{j["desc"]}" end end |
permalink #write_row ⇒ Object
[View source]
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rspec_github_actions_summary/example_group.rb', line 11 def write_row [ passed? ? '✅ Pass' : '❌ Failed', json['passed_specs'], json['failed_specs'], json['skipped_specs'], json['total_specs'], duration ] end |