Permalink
Browse files

Merge branch 'treetop-behaves_like_gherkin' of git://github.com/ghnat…

…iuk/cucumber into treetop-behaves_like_gherkin
  • Loading branch information...
aslakhellesoy committed Apr 19, 2010
2 parents fd90175 + 7c0acd3 commit 074f51b835bb6a02596f78871ea21f5fe5342ae4
Showing with 4 additions and 2 deletions.
  1. +3 −1 features/announce.feature
  2. +1 −1 lib/cucumber/step_mother.rb
@@ -10,7 +10,7 @@ Feature: Delayed announcement
Given /^I use multiple announces$/ do x=1
announce("Multiple")
- announce(["Announce"])
+ announce(["Announce","Me"])
end
Given /^I use announcement (.+) in line (.+) (?:with result (.+))$/ do |ann, line, result| x=1
@@ -88,6 +88,7 @@ Feature: Delayed announcement
Given I use multiple announces # features/step_definitions/steps.rb:5
Multiple
Announce
+ Me
And this step works # features/step_definitions/steps.rb:21
Scenario Outline: S3 # features/f.feature:11
@@ -128,6 +129,7 @@ Feature: Delayed announcement
Multiple
Announce
+ Me
..-UUUUUU
Announce with fail
F--
@@ -122,7 +122,7 @@ def steps(status = nil) #:nodoc:
# nicer, and in all outputs (in case you use several formatters)
#
def announce(msg)
- @visitor.announce(msg.to_s)
+ msg.respond_to?(:join) ? @visitor.announce(msg.join("\n")) : @visitor.announce(msg.to_s)
end
# Suspends execution and prompts +question+ to the console (STDOUT).

0 comments on commit 074f51b

Please sign in to comment.