diff options
author | Frank Lam <ryzingsun11@yahoo.com> | 2020-05-24 20:48:38 +0800 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | f0ae5ac3135a6cf26666ec6ba33d34a738df7573 (patch) | |
tree | cec8aa00b3b8f5d5326a494a491489c24e4c4ce0 /lib | |
parent | 0d240de2f32d877ca714ef6c0b51667367ec1498 (diff) |
[rubygems/rubygems] Display test_framework_hint before prompting for user selection
* On ubuntu-bundler/ubuntu_bundler3, longer lines of text get cut off
after ~50 characters
* Example: https://github.com/rubygems/rubygems/pull/3544/checks?check_run_id=703658810
https://github.com/rubygems/rubygems/commit/6a17847fd8
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/gem.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 2c2ed2724b..d069ca36f0 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -221,8 +221,9 @@ module Bundler if test_framework.to_s.empty? Bundler.ui.confirm "Do you want to generate tests with your gem?" - result = Bundler.ui.ask "Type 'rspec', 'minitest' or 'test-unit' to generate those test files now. \n" \ - "#{test_framework_hint} rspec/minitest/test-unit/(none):" + Bundler.ui.info test_framework_hint + result = Bundler.ui.ask "Type 'rspec', 'minitest' or 'test-unit' to generate those test files now. " \ + "rspec/minitest/test-unit/(none):" if result =~ /rspec|minitest|test-unit/ test_framework = result else |