JEG2 / highline

A higher level command-line oriented interface.
Other
1.29k stars 137 forks source link

lib/highline.rb not requiring lib/highline/question_asker.rb #165

Closed abinoam closed 9 years ago

abinoam commented 9 years ago

Hi @matugm ,

The tests were not able to catch this bug.

I think it would be easily fixed with a

require 'question_asker'

on lib/highline.rb

NameError: Bad color or uninitialized constant QuestionAsker
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/builtin_styles.rb:104:in `const_missing'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline.rb:186:in `ask'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/paginator.rb:37:in `continue_paging?'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/paginator.rb:27:in `page_print'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/statement.rb:37:in `format_statement'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/statement.rb:18:in `statement'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline/statement.rb:22:in `to_s'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline.rb:309:in `render_statement'
    from /Users/abinoam/.rvm/gems/ruby-2.2.3/gems/highline-2.0.0.pre.develop.2/lib/highline.rb:293:in `say'
    from (irb):3
    from /Users/abinoam/.rvm/rubies/ruby-2.2.3/bin/irb:15:in `<main>'
abinoam commented 9 years ago

The bug shows up in the acceptance tests (with rake acceptance)

matugm commented 9 years ago

I will look into it. Can we add a new unit test that covers this problem?