Skip to content

Commit

Permalink
Fixed progress formatter raising errors when running Scenario outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Wilk committed Apr 24, 2009
1 parent 0d258a6 commit f4898ef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions History.txt
Expand Up @@ -9,6 +9,7 @@ With the addition of Latvian and Hungarian Cucumber now supports 32(!!) language
* Pick up failure on after hook (#272 Aslak Hellesøy)

=== Bugfixes
* Fixed progress formatter raising errors when running Scenario outlines (#302 Joseph Wilk)
* Span html tags appear on HTML results with 0.3.0 (#299 Aslak Hellesøy)
* Fixed incorrect colours in pretty formatter's table headers for outline tables (Aslak Hellesøy)
* Exceptions from steps called within hooks are now reraised. (#294 Ben Mabey)
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/formatter/progress.rb
Expand Up @@ -29,6 +29,7 @@ def visit_step_name(keyword, step_match, status, source_indent, background)
end

def visit_table_cell_value(value, width, status)
status ||= @status || :passed
progress(status) if (status != :thead) && !@multiline_arg
end

Expand Down
24 changes: 24 additions & 0 deletions spec/cucumber/formatter/progress_spec.rb
@@ -0,0 +1,24 @@
require File.dirname(__FILE__) + '/../../spec_helper'

module Cucumber
module Formatter
describe Progress do

before(:all) do
Term::ANSIColor.coloring = false
end

describe "visiting a table cell value without a status" do
it "should default to the 'pass' status" do
out = StringIO.new
progress = Progress.new(mock("step mother"), out, {})

progress.visit_table_cell_value('value', 10, nil)

out.string.should == "."
end
end

end
end
end

0 comments on commit f4898ef

Please sign in to comment.