method
ask_and_set_test_framework
v2_6_3 -
Show latest stable
-
0 notes -
Class: Gem
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
ask_and_set_test_framework()
private
Hide source
# File lib/bundler/cli/gem.rb, line 197 def ask_and_set_test_framework test_framework = options[:test] || Bundler.settings["gem.test"] if test_framework.nil? Bundler.ui.confirm "Do you want to generate tests with your gem?" result = Bundler.ui.ask "Type 'rspec' or 'minitest' to generate those test files now and " "in the future. rspec/minitest/(none):" if result =~ /rspec|minitest/ test_framework = result else test_framework = false end end if Bundler.settings["gem.test"].nil? Bundler.settings.set_global("gem.test", test_framework) end test_framework end