Skip to content

Commit

Permalink
Fix ugly code. Closes cucumber#59 and cucumber#61
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy authored and coffeencoke committed May 31, 2011
1 parent a299fe3 commit dafd90e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions History.txt
@@ -1,6 +1,7 @@
== In Git

=== New Features
* Better JUnit formatter support for sub directories and scenario outlines (#59, #61 Matt Simpson)
* Coloured output that spans several lines sets colours for each line. (Aslak Hellesøy)
* New bundler attribute on the Rake task, allowing faster execution. (Aslak Hellesøy)
* Fix Table#rows cell ordering in ruby 1.8. (#47_github Brian Dunn)
Expand Down
9 changes: 2 additions & 7 deletions lib/cucumber/formatter/junit.rb
Expand Up @@ -57,13 +57,8 @@ def feature_name(keyword, name)
end

def scenario_name(keyword, name, file_colon_line, source_indent)
# TODO: What's all this ugly weird code doing? Why not just use keyword and name????
scenario_name = name.strip.delete(".\r\n")
scenario_name = "Unnamed scenario" if name == ""
@scenario = scenario_name
description = "Scenario"
description << " outline" if keyword.include?('Scenario Outline')
@output = "#{description}: #{@scenario}\n\n"
@scenario = (name.nil? || name == "") ? "Unnamed scenario" : name.split("\n")[0]
@output = "#{keyword}: #{@scenario}\n\n"
end

def before_steps(steps)
Expand Down

0 comments on commit dafd90e

Please sign in to comment.