class UglyFace::Formatter::ReportStep
Attributes
duration[RW]
error[RW]
file_colon_line[RW]
keyword[RW]
multiline_arg[RW]
name[RW]
status[RW]
table[RW]
Public Class Methods
new(step, ast_step=nil)
click to toggle source
# File lib/ugly_face/formatter/report.rb, line 197 def initialize(step, ast_step=nil) if ast_step @name = ast_step.name @keyword = ast_step.keyword @status = ast_step.status @error = ast_step.exception else @name = step.name unless step.instance_of? Cucumber::Formatter::LegacyApi::Ast::Background @keyword = step.keyword @status = step.status @multiline_arg = step.multiline_arg unless step.multiline_arg.instance_of? Cucumber::Core::Ast::EmptyMultilineArgument @error = step.exception end end @file_colon_line = step.file_colon_line end
Public Instance Methods
extra_failure_content(file_colon_line)
click to toggle source
from cucumber ===================
# File lib/ugly_face/formatter/report.rb, line 234 def extra_failure_content(file_colon_line) @snippet_extractor ||= SnippetExtractor.new @snippet_extractor.snippet(file_colon_line) end
failed_with_error?()
click to toggle source
# File lib/ugly_face/formatter/report.rb, line 215 def failed_with_error? status == :failed && !error.nil? end
file_with_error(file_colon_line)
click to toggle source
# File lib/ugly_face/formatter/report.rb, line 227 def file_with_error(file_colon_line) @snippet_extractor ||= SnippetExtractor.new file, line = @snippet_extractor.file_name_and_line(file_colon_line) file end
has_multiline_arg?()
click to toggle source
# File lib/ugly_face/formatter/report.rb, line 223 def has_multiline_arg? !multiline_arg.nil? && !has_table? end
has_table?()
click to toggle source
# File lib/ugly_face/formatter/report.rb, line 219 def has_table? not table.nil? end