You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run Cucumber with the JUnit formatter enabled on an application which has code like the following:
Logger.new($stderr)
You will get an exception like this:
can't convert Cucumber::Formatter::Interceptor::Pipe into String
/Users/rsutphin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:592:in open' /Users/rsutphin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:592:inopen_logfile'
/Users/rsutphin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:549:in initialize' /Users/rsutphin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:314:innew'
/Users/rsutphin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:314:in `initialize'
Ruby's built in logger uses this check to determine if a passed in object is an IO:
if log.respond_to?(:write) and log.respond_to?(:close)
Pipe has a write method, so adding a no-op Cucumber::Formatter::Interceptor::Pipe#close method might work around this problem.
—
Reply to this email directly or view it on GitHub.
Thanks for figuring this out. Do you think you put together a pull request with a failing integration test for this? It's much more likely to get fixed that way.
If you run Cucumber with the JUnit formatter enabled on an application which has code like the following:
You will get an exception like this:
Ruby's built in logger uses this check to determine if a passed in object is an
IO
:Pipe
has awrite
method, so adding a no-opCucumber::Formatter::Interceptor::Pipe#close
method might work around this problem.The text was updated successfully, but these errors were encountered: