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.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb
index e0e2e9afdf..8c95723bcc 100644
--- a/spec/bundler/plugin_spec.rb
+++ b/spec/bundler/plugin_spec.rb
@@ -107,7 +107,7 @@ RSpec.describe Bundler::Plugin do
describe "evaluate gemfile for plugins" do
let(:definition) { double("definition") }
let(:builder) { double("builder") }
- let(:gemfile) { bundled_app("Gemfile") }
+ let(:gemfile) { bundled_app_gemfile }
before do
allow(Plugin::DSL).to receive(:new) { builder }
@@ -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