Permalink
Browse files

Quick hack to show how the formatter needs to change to work with the…

… new API
  • Loading branch information...
1 parent 9ea5ebb commit 9186db375ad3b88956ba210b148ccbb1077baa3f @mattwynne committed Nov 4, 2009
Showing with 6 additions and 8 deletions.
  1. +6 −8 teamcity_formatter.rb
View
@@ -25,7 +25,7 @@ def initialize(step_mother, io, options, delim='|')
# Hook for new feature.
# Because cucumber does not provide begin and end hooks,
# we store the feature name and issue a Finished when it changes
- def visit_feature_name(name)
+ def feature_name(name)
name=name.split("\n").first
@current_feature=name if @current_feature.nil?
if name != @current_feature
@@ -35,13 +35,13 @@ def visit_feature_name(name)
feature_start(@current_feature)
end
- def visit_exception(exception, status)
+ def exception(exception, status)
test_failure(@current_step,format_exception(exception)) if status == :failed
end
# put each step into the messages buffer. Because of the way teamcity formats
# output, we want to output all our messages at the same time
- def visit_step_name(keyword, step_match, status, source_indent, background)
+ def step_name(keyword, step_match, status, source_indent, background)
line=format_step(keyword, step_match, status)
@current_step=line
if status != :passed
@@ -60,7 +60,7 @@ def visit_step_name(keyword, step_match, status, source_indent, background)
)
end
- def visit_scenario_name(keyword, name, file_colon_line, source_indent)
+ def scenario_name(keyword, name, file_colon_line, source_indent)
visit_feature_element_name(keyword, name, file_colon_line, source_indent)
end
@@ -80,13 +80,11 @@ def visit_feature_element_name(keyword, name, file_colon_line, source_indent)
scenario_start(line)
end
- def visit_outline_table(outline_table)
+ def before_outline_table(outline_table)
step_message("#{timestamp_short} running outline: ")
- super
end
- def visit_table_row(table_row)
- super
+ def after_table_row(table_row)
if table_row.exception
test_failure(format_table_row(table_row, :failed),format_exception(table_row.exception))
else

0 comments on commit 9186db3

Please sign in to comment.