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
Returns a new instance of ReportScenario.
167 168 169 170 171 172 173 |
# File 'lib/pretty_face/formatter/report.rb', line 167 def initialize(scenario) @steps = [] @image = [] @image_label = [] @image_id = [] @start = Time.now end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def duration @duration end |
#file_colon_line ⇒ Object
Returns the value of attribute file_colon_line.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def file_colon_line @file_colon_line end |
#image ⇒ Object
Returns the value of attribute image.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def image @image end |
#image_id ⇒ Object
Returns the value of attribute image_id.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def image_id @image_id end |
#image_label ⇒ Object
Returns the value of attribute image_label.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def image_label @image_label end |
#name ⇒ Object
Returns the value of attribute name.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def status @status end |
#steps ⇒ Object
Returns the value of attribute steps.
165 166 167 |
# File 'lib/pretty_face/formatter/report.rb', line 165 def steps @steps end |
Instance Method Details
#has_image? ⇒ Boolean
187 188 189 |
# File 'lib/pretty_face/formatter/report.rb', line 187 def has_image? not image.nil? end |
#populate(scenario) ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/pretty_face/formatter/report.rb', line 175 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 |