summaryrefslogtreecommitdiff
path: root/spec/bundler/plugin_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-03-10 15:39:37 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-03-10 17:19:44 +0100
commit05725a9bacc56ef5ff811dabadecce016383a886 (patch)
tree548ffe0bfbfaeb519b9672c8b8f29288e0c71a0f /spec/bundler/plugin_spec.rb
parent00da5215e90c6483728e077df4e90ab6cd34c35d (diff)
downloadbundler-config_location.tar.gz
Use thread safe method to find cwdconfig_location
And stub that in plugin's specs.
Diffstat (limited to 'spec/bundler/plugin_spec.rb')
-rw-r--r--spec/bundler/plugin_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb
index 8c95723bcc..9341b4ada3 100644
--- a/spec/bundler/plugin_spec.rb
+++ b/spec/bundler/plugin_spec.rb
@@ -237,7 +237,8 @@ RSpec.describe Bundler::Plugin do
describe "#root" do
context "in app dir" do
before do
- allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
+ allow(Bundler::SharedHelpers).to receive(:pwd).and_return(bundled_app)
+ FileUtils.touch(bundled_app.join("Gemfile"))
end
it "returns plugin dir in app .bundle path" do
@@ -247,7 +248,7 @@ RSpec.describe Bundler::Plugin do
context "outside app dir" do
before do
- allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(nil)
+ allow(Bundler::SharedHelpers).to receive(:pwd).and_return(root)
end
it "returns plugin dir in global bundle path" do