summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshekharrajak <shekharstudy@ymail.com>2017-02-23 12:30:26 +0530
committershekharrajak <shekharstudy@ymail.com>2017-02-23 12:32:37 +0530
commit4dec0e6f2c980c2b21fc96c987fbda5c6c351093 (patch)
tree9f816cb1c7a69c7d9a6cd532ad52965ad0d5f5e0
parent830281c4d65e90e14991dd1f2a420927d498d5c1 (diff)
downloadbundler-4dec0e6f2c980c2b21fc96c987fbda5c6c351093.tar.gz
test added
-rw-r--r--spec/commands/newgem_spec.rb17
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