summaryrefslogtreecommitdiff
path: root/spec/bundler/plugin_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/plugin_spec.rb')
-rw-r--r--spec/bundler/plugin_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb
index cb6012da45..8c95723bcc 100644
--- a/spec/bundler/plugin_spec.rb
+++ b/spec/bundler/plugin_spec.rb
@@ -237,7 +237,7 @@ RSpec.describe Bundler::Plugin do
describe "#root" do
context "in app dir" do
before do
- gemfile ""
+ allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
end
it "returns plugin dir in app .bundle path" do
@@ -246,8 +246,11 @@ RSpec.describe Bundler::Plugin do
end
context "outside app dir" do
+ before do
+ allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(nil)
+ end
+
it "returns plugin dir in global bundle path" do
- Dir.chdir tmp
expect(subject.root).to eq(home.join(".bundle/plugin"))
end
end