summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-24 21:47:34 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-24 21:47:34 +0100
commit9dd43cecfe098774919a53cea1f5805a9be3d831 (patch)
treeb5fdc9baaba88c9f3a783870eca419cc3cec960b
parent12b786888e630a6141273d28b74ec4b2e075cc44 (diff)
downloadbundler-9dd43cecfe098774919a53cea1f5805a9be3d831.tar.gz
Create test lib in tmp, not in the root of the repo
So it runs in the isolated tmp as expected. Also, as it is written, this spec would leave a leftover `_gem` folder in the root of the repo in case it fails, since the root of the repo is obviously not cleaned up after each test.
-rw-r--r--spec/cache/path_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb
index 79e8b4a82b..3f3d4ec893 100644
--- a/spec/cache/path_spec.rb
+++ b/spec/cache/path_spec.rb
@@ -31,8 +31,8 @@ RSpec.describe "bundle cache with path" do
end
it "copies when the path is outside the bundle and the paths intersect" do
- libname = File.basename(Dir.pwd) + "_gem"
- libpath = File.join(File.dirname(Dir.pwd), libname)
+ libname = File.basename(bundled_app) + "_gem"
+ libpath = File.join(File.dirname(bundled_app), libname)
build_lib libname, :path => libpath