diff options
author | Utkarsh Kukreti <utkarshkukreti@gmail.com> | 2013-01-30 22:33:49 +0530 |
---|---|---|
committer | Utkarsh Kukreti <utkarshkukreti@gmail.com> | 2013-01-30 22:33:49 +0530 |
commit | 4881fa4eca941273c93c18995cd050edd43e1082 (patch) | |
tree | 1c1c0a2e90be2835f2e4dd5744e08f729b28b481 /spec/other | |
parent | 364d4dbe0077cf2f0f667bbee5e895b8fa528a9c (diff) | |
download | bundler-4881fa4eca941273c93c18995cd050edd43e1082.tar.gz |
Make rspec a lazy default for `--test` parameter on `bundle new gem`.
Diffstat (limited to 'spec/other')
-rw-r--r-- | spec/other/newgem_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/other/newgem_spec.rb b/spec/other/newgem_spec.rb index 946da19b..8b45e700 100644 --- a/spec/other/newgem_spec.rb +++ b/spec/other/newgem_spec.rb @@ -120,6 +120,22 @@ RAKEFILE end end + context "no --test parameter" do + before do + reset! + in_app_root + bundle "gem #{gem_name}" + end + + it "doesn't create any spec/test file" do + expect(bundled_app("test_gem/.rspec")).to_not exist + expect(bundled_app("test_gem/spec/test_gem_spec.rb")).to_not exist + expect(bundled_app("test_gem/spec/spec_helper.rb")).to_not exist + expect(bundled_app("test_gem/test/test_test_gem.rb")).to_not exist + expect(bundled_app("test_gem/test/minitest_helper.rb")).to_not exist + end + end + context "--test parameter set to rspec" do before do reset! @@ -280,6 +296,22 @@ RAKEFILE end end + context "no --test parameter" do + before do + reset! + in_app_root + bundle "gem #{gem_name}" + end + + it "doesn't create any spec/test file" do + expect(bundled_app("test-gem/.rspec")).to_not exist + expect(bundled_app("test-gem/spec/test/gem_spec.rb")).to_not exist + expect(bundled_app("test-gem/spec/spec_helper.rb")).to_not exist + expect(bundled_app("test-gem/test/test_test/gem.rb")).to_not exist + expect(bundled_app("test-gem/test/minitest_helper.rb")).to_not exist + end + end + context "--test parameter set to rspec" do before do reset! |