Class: Redcukes::FeatureReport

Inherits:
Object
  • Object
show all
Defined in:
lib/redcukes/feature_report.rb

Instance Method Summary collapse

Constructor Details

#initialize(step_mother, io, options) ⇒ FeatureReport

Returns a new instance of FeatureReport.



3
4
5
# File 'lib/redcukes/feature_report.rb', line 3

def initialize(step_mother, io, options)
  @status = {}
end

Instance Method Details

#after_feature(feature) ⇒ Object



15
16
17
18
# File 'lib/redcukes/feature_report.rb', line 15

def after_feature feature
  id = feature.file.scan(/(\d+)/).flatten[0].to_i
  Issue.update_status id, @status
end

#after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object



11
12
13
# File 'lib/redcukes/feature_report.rb', line 11

def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
  @status[status] += 1 if @status.has_key? status
end

#before_feature(feature) ⇒ Object



7
8
9
# File 'lib/redcukes/feature_report.rb', line 7

def before_feature feature
  @status[:errors] = @status[:undefined] = @status[:failed] = @status[:passed]= 0
end