diff options
author | Colby Swandale <colby@taplaboratories.com> | 2017-03-19 19:09:56 +1100 |
---|---|---|
committer | Colby Swandale <colby@taplaboratories.com> | 2017-03-19 19:09:56 +1100 |
commit | 5cd6aef0ce64391524460a76c004e46b2abb8d13 (patch) | |
tree | a87fcf0665865a2a15b8fe469e19c872f9eac49d | |
parent | 5168d7e346a4cdb7430f2585875adfb3b6aee770 (diff) | |
download | bundler-5cd6aef0ce64391524460a76c004e46b2abb8d13.tar.gz |
run specs without git in the env
-rw-r--r-- | spec/commands/newgem_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 9f39159c55..3c9df483fa 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -169,9 +169,13 @@ RSpec.describe "bundle gem" do context "when git is not avaiable" do let(:gem_name) { "test_gem" } + # This spec cannot have `git` avaiable in the test env before do - allow(Bundler).to receive(:git_present?).and_return(false) - bundle "gem #{gem_name}" + bundle_bin = File.expand_path("../../../exe/bundle", __FILE__) + load_paths = [lib, spec] + load_path_str = "-I#{load_paths.join(File::PATH_SEPARATOR)}" + + sys_exec "PATH= #{Gem.ruby} #{load_path_str} #{bundle_bin} gem #{gem_name}" end it "creates the gem without the need for git" do |