diff options
Diffstat (limited to 'spec/bundler/plugin/index_spec.rb')
-rw-r--r-- | spec/bundler/plugin/index_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/bundler/plugin/index_spec.rb b/spec/bundler/plugin/index_spec.rb index e18e960fb8..925dc558ac 100644 --- a/spec/bundler/plugin/index_spec.rb +++ b/spec/bundler/plugin/index_spec.rb @@ -4,6 +4,7 @@ RSpec.describe Bundler::Plugin::Index do Index = Bundler::Plugin::Index before do + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) gemfile "" path = lib_path(plugin_name) index.register_plugin("new-plugin", path.to_s, [path.join("lib").to_s], commands, sources, hooks) @@ -117,11 +118,11 @@ RSpec.describe Bundler::Plugin::Index do describe "global index" do before do - Dir.chdir(tmp) do - Bundler::Plugin.reset! - path = lib_path("gplugin") - index.register_plugin("gplugin", path.to_s, [path.join("lib").to_s], [], ["glb_source"], []) - end + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(nil) + + Bundler::Plugin.reset! + path = lib_path("gplugin") + index.register_plugin("gplugin", path.to_s, [path.join("lib").to_s], [], ["glb_source"], []) end it "skips sources" do |