lib/gurke/formatter.rb in gurke-1.0.0 vs lib/gurke/formatter.rb in gurke-1.0.1
- old
+ new
@@ -15,10 +15,12 @@
else
legacy << klass.new(runtime, path_or_io, options)
end
end
+ at_exit { invoke :after, :all }
+
self.class.instance = self
end
def formatters
@formatters ||= []
@@ -29,10 +31,11 @@
end
## -- Before callbacks --
def before_features(features)
+ invoke :before, :all
invoke :before, :features, [features]
end
def before_feature(feature)
invoke :before, :feature, [feature]
@@ -95,10 +98,10 @@
## -- After callbacks --
def after_feature_element(element)
invoke :after, :feature_element, [element]
- invoke :before, :scenario, args: [element]
+ invoke :after, :scenario, args: [element]
end
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
invoke :after, :step_result, [keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line]
end