diff options
author | Andre Arko <andre@arko.net> | 2012-11-27 15:36:17 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2012-11-27 15:37:08 -0800 |
commit | 6c125c3ca89e4c5eb67ba812fb17cbfa9df0975b (patch) | |
tree | 6d138368d47c614ea1d78933c14e5db7e22e0974 | |
parent | 4680712be12c1aa982f163353c300ec564b7f797 (diff) | |
parent | 4b08af71f830c5f59f5e7585711078565a2874d5 (diff) | |
download | bundler-6c125c3ca89e4c5eb67ba812fb17cbfa9df0975b.tar.gz |
Merge pull request #2184 from kcurtin/updating-docs-rspec-default
added rspec as default for new gems and updated docs, addresses #2179
-rw-r--r-- | lib/bundler/cli.rb | 2 | ||||
-rw-r--r-- | spec/other/newgem_spec.rb | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 954e59935b..5871d51b89 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -590,7 +590,7 @@ module Bundler desc "gem GEM", "Creates a skeleton for creating a rubygem" method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library." - method_option :test, :type => :string, :default => nil, :aliases => '-t', :banner => "Generate test directory for your library." + method_option :test, :type => :string, :default => 'rspec', :aliases => '-t', :banner => "Generate a test directory for your library: 'rspec' is the default, but 'minitest' is also supported." def gem(name) name = name.chomp("/") # remove trailing slash if present target = File.join(Dir.pwd, name) diff --git a/spec/other/newgem_spec.rb b/spec/other/newgem_spec.rb index 8ac227652b..e89c2148bb 100644 --- a/spec/other/newgem_spec.rb +++ b/spec/other/newgem_spec.rb @@ -152,4 +152,17 @@ RAKEFILE expect(bundled_app("test-gem/test/test_test-gem.rb").read).to match(/assert false/) end end + + context "--test with no arguments" do + before :each do + reset! + in_app_root + bundle "gem test-gem --test" + end + + it "defaults to rspec" do + expect(bundled_app("test-gem/spec/spec_helper.rb")).to exist + expect(bundled_app("test-gem/test/minitest_helper.rb")).to_not exist + end + end end |