Watir changes highline's "ask" method

Posted by grundic on Stack Overflow See other posts from Stack Overflow or by grundic
Published on 2010-05-25T08:50:56Z Indexed on 2010/05/28 7:21 UTC
Read the original article Hit count: 255

Filed under:
|
|

Hello! I've encoutered some strange functionality, when using Watir and Highline together.

Here is simple example:

require 'highline/import'
comp = ask("Company?  ") { |q| q.default = "MySuperCompany" }
puts comp

require 'watir'
comp = ask("Company?  ") { |q| q.default = "MySuperCompany" }
puts comp

Here is an output:

Company?  |MySuperCompany|
MySuperCompany
[Company?  ] =>
Company?

Maybe it's a bug? I've also found in documentation for highline, that

If @question is set before ask() is called, parameters are ignored and that object (must be a HighLine::Question) is used to drive the process instead.

Sorry, I'm not a ruby guru :-(

© Stack Overflow or respective owner

Related posts about ruby

Related posts about watir