Permalink
Browse files

Small formatting improvements

  • Loading branch information...
1 parent be797ab commit 7308cc692d6839508ead2e262ebd924caf24e050 @aslakhellesoy aslakhellesoy committed Apr 1, 2009
Showing with 5 additions and 5 deletions.
  1. +5 −1 lib/cucumber/formatter/html.rb
  2. +0 −4 lib/cucumber/formatter/pretty.rb
@@ -74,9 +74,11 @@ def visit_scenario_name(keyword, name, file_colon_line, source_indent)
end
def visit_outline_table(outline_table)
+ @outline_row = 0
@builder.table do
super(outline_table)
end
+ @outline_row = nil
end
def visit_examples_name(keyword, name)
@@ -145,10 +147,12 @@ def visit_table_row(table_row)
end
end
end
+ @outline_row += 1 if @outline_row
end
def visit_table_cell_value(value, width, status)
- @builder.td(value, :class => status, :id => "#{@row_id}_#{@col_index}")
+ cell_type = @outline_row == 0 ? :th : :td
+ @builder.__send__(cell_type, value, :class => status, :id => "#{@row_id}_#{@col_index}")
@col_index += 1
end
@@ -157,10 +157,6 @@ def visit_py_string(string, status)
@io.flush
end
- def visit_table_cell(table_cell)
- super
- end
-
def visit_table_cell_value(value, width, status)
@io.print(' ' + format_string((value.to_s || '').ljust(width), status) + " #{@delim}")
@io.flush

0 comments on commit 7308cc6

Please sign in to comment.