summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-25 13:46:04 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-13 13:24:25 +0100
commit77d6bc2219748a6ea45f69e6dc74b3b4daface17 (patch)
tree7eabdaa311794f6f2f3b06bf3dd872d3f6cea070
parent6cd2b34350b8e36d7cd94bf49f29e10e764539f3 (diff)
downloadbundler-77d6bc2219748a6ea45f69e6dc74b3b4daface17.tar.gz
Test repo1 should be inmutable
-rw-r--r--spec/bundler/gem_helper_spec.rb5
-rw-r--r--spec/commands/info_spec.rb2
-rw-r--r--spec/spec_helper.rb1
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index 0a12aeaa03..dc982c6ee7 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -209,10 +209,11 @@ RSpec.describe Bundler::GemHelper do
end
context "succeeds" do
+ let(:repo) { build_git("foo", :bare => true) }
+
before do
- Dir.chdir(gem_repo1) { sys_exec("git init --bare") }
Dir.chdir(app_path) do
- sys_exec("git remote add origin file://#{gem_repo1}")
+ sys_exec("git remote add origin file://#{repo.path}")
sys_exec('git commit -a -m "initial commit"')
end
end
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
index 39e97a05f3..70a304823a 100644
--- a/spec/commands/info_spec.rb
+++ b/spec/commands/info_spec.rb
@@ -34,7 +34,7 @@ RSpec.describe "bundle info" do
context "when gem does not have homepage" do
before do
- build_repo1 do
+ build_repo2 do
build_gem "rails", "2.3.2" do |s|
s.executables = "rails"
s.summary = "Just another test gem"
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index bd1125dec1..dbfeb30db7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -36,7 +36,6 @@ $debug = false
Spec::Manpages.setup unless Gem.win_platform?
Spec::Rubygems.setup
-FileUtils.rm_rf(Spec::Path.gem_repo1)
ENV["RUBYOPT"] = "#{ENV["RUBYOPT"]} -r#{Spec::Path.spec_dir}/support/hax.rb"
ENV["BUNDLE_SPEC_RUN"] = "true"