class StepStats::Formatter
Public Class Methods
new(step_mother, io, options)
click to toggle source
Calls superclass method
# File lib/step_stats/step_stats_formatter.rb, line 6 def initialize(step_mother, io, options) @sss = Stats.new super end
Public Instance Methods
after_features(*args)
click to toggle source
Calls superclass method
# File lib/step_stats/step_stats_formatter.rb, line 22 def after_features(*args) @path = File.dirname(__FILE__) template = File.read(@path+"/template.erb") @data = @sss.stats result = ERB.new(template, 0, "", "@html").result(binding) stats_html_file = File.new('tmp/step_stats.html','w') stats_html_file.write(result) stats_html_file.close super end
before_step(step)
click to toggle source
Calls superclass method
# File lib/step_stats/step_stats_formatter.rb, line 11 def before_step(step) @start_time = Time.now super end
before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
click to toggle source
Calls superclass method
# File lib/step_stats/step_stats_formatter.rb, line 16 def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) @duration = Time.now - @start_time @sss.add_stat(step_match.step_definition,@duration,status,file_colon_line) if @duration > 0 super end