diff options
author | shekharrajak <shekharstudy@ymail.com> | 2017-02-23 12:30:26 +0530 |
---|---|---|
committer | shekharrajak <shekharstudy@ymail.com> | 2017-02-23 12:32:37 +0530 |
commit | 4dec0e6f2c980c2b21fc96c987fbda5c6c351093 (patch) | |
tree | 9f816cb1c7a69c7d9a6cd532ad52965ad0d5f5e0 | |
parent | 830281c4d65e90e14991dd1f2a420927d498d5c1 (diff) | |
download | bundler-4dec0e6f2c980c2b21fc96c987fbda5c6c351093.tar.gz |
test added
-rw-r--r-- | spec/commands/newgem_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 599ebb6d09..2cbe758e56 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -144,6 +144,23 @@ RSpec.describe "bundle gem" do expect(bundled_app("test_gem/README.md").read).not_to include("github.com/bundleuser") end end + + context "git is not installed in the system" do + before do + `rm "#{ENV["GIT_CONFIG"]}"` if File.exist?(ENV["GIT_CONFIG"]) + reset! + in_app_root + bundle "gem #{gem_name}" + remove_push_guard(gem_name) + end + + it "contribute URL set to [USERNAME]" do + expect(bundled_app("test_gem/README.md").read).to include("[USERNAME]") + expect(bundled_app("test_gem/README.md").read).not_to include("github.com/bundleuser") + end + + it_should_behave_like "git config is absent" + end end it "generates a valid gemspec" do |