Class: PrettyFace::Formatter::ReportScenario
- Inherits:
-
Object
- Object
- PrettyFace::Formatter::ReportScenario
- Defined in:
- lib/pretty_face/formatter/report.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#file_colon_line ⇒ Object
Returns the value of attribute file_colon_line.
-
#image ⇒ Object
Returns the value of attribute image.
-
#image_id ⇒ Object
Returns the value of attribute image_id.
-
#image_label ⇒ Object
Returns the value of attribute image_label.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#steps ⇒ Object
Returns the value of attribute steps.
Instance Method Summary collapse
- #has_image? ⇒ Boolean
-
#initialize(scenario) ⇒ ReportScenario
constructor
A new instance of ReportScenario.
- #populate(scenario) ⇒ Object
Constructor Details
#initialize(scenario) ⇒ ReportScenario
153 154 155 156 |
# File 'lib/pretty_face/formatter/report.rb', line 153 def initialize(scenario) @steps = [] @start = Time.now end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def duration @duration end |
#file_colon_line ⇒ Object
Returns the value of attribute file_colon_line.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def file_colon_line @file_colon_line end |
#image ⇒ Object
Returns the value of attribute image.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def image @image end |
#image_id ⇒ Object
Returns the value of attribute image_id.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def image_id @image_id end |
#image_label ⇒ Object
Returns the value of attribute image_label.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def image_label @image_label end |
#name ⇒ Object
Returns the value of attribute name.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def status @status end |
#steps ⇒ Object
Returns the value of attribute steps.
151 152 153 |
# File 'lib/pretty_face/formatter/report.rb', line 151 def steps @steps end |
Instance Method Details
#has_image? ⇒ Boolean
170 171 172 |
# File 'lib/pretty_face/formatter/report.rb', line 170 def has_image? not image.nil? end |
#populate(scenario) ⇒ Object
158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/pretty_face/formatter/report.rb', line 158 def populate(scenario) @duration = Time.now - @start if scenario.instance_of? Cucumber::Ast::Scenario @name = scenario.name @file_colon_line = scenario.file_colon_line elsif scenario.instance_of? Cucumber::Ast::OutlineTable::ExampleRow @name = scenario.scenario_outline.name @file_colon_line = scenario.backtrace_line end @status = scenario.status end |