buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Toulme (JIRA)" <>
Subject [jira] Commented: (BUILDR-266) puts with no message triggers a warning.
Date Wed, 11 Mar 2009 18:36:50 GMT


Antoine Toulme commented on BUILDR-266:

Here is how we work around the problem:

Cucumber::Broadcaster.class_eval do
  alias :safe_puts :puts

require File.join(File.dirname(__FILE__), "/../../buildr/spec/spec_helpers.rb")

Cucumber::Broadcaster.class_eval do
  alias :puts :safe_puts

That way the only one that uses puts is the broadcaster. All the others using puts will be
redirected to the buildr trap so the output of methods may be tested.

> puts with no message triggers a warning.
> ----------------------------------------
>                 Key: BUILDR-266
>                 URL:
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Antoine Toulme
>            Priority: Minor
> We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue
when running rake features, the default task to run all the cucumber .feature files, it shows
this message:
> ./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values
for a block parameter (0 for 1)
> 	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41
> cucumber actually outputs a few empty lines: @io.puts
> That doesn't seem to do too well with your code here:
>  define_method severity do |message|
>           $messages ||= {}
>           ($messages[severity] ||= []) << message
>         end

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message