diff options
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r-- | lib/bundler/cli/gem.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 3fd67d9a88..7fe76adf4c 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -213,10 +213,12 @@ module Bundler def ask_and_set_test_framework test_framework = options[:test] || Bundler.settings["gem.test"] - if test_framework.nil? + 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 and " \ - "in the future. rspec/minitest/test-unit/(none):" + result = Bundler.ui.ask "Type 'rspec', 'minitest' or 'test-unit' to generate those test files now. \n" \ + "If Bundler is configured to not generate test files, your choice will only be applied to this instance. \n" \ + "Otherwise, future bundle gem calls will use your choice, so -t is not needed if your choice will be the same. \n" \ + "This setting can be changed anytime with bundle config gem.test <value>. rspec/minitest/test-unit/(none):" if result =~ /rspec|minitest|test-unit/ test_framework = result else |