diff options
Diffstat (limited to 'spec/bundler/bundler/plugin/index_spec.rb')
-rw-r--r-- | spec/bundler/bundler/plugin/index_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/bundler/bundler/plugin/index_spec.rb b/spec/bundler/bundler/plugin/index_spec.rb index ca3476ea2a..e18e960fb8 100644 --- a/spec/bundler/bundler/plugin/index_spec.rb +++ b/spec/bundler/bundler/plugin/index_spec.rb @@ -86,6 +86,17 @@ RSpec.describe Bundler::Plugin::Index do expect(new_index.hook_plugins("after-bar")).to eq([plugin_name]) end + it "only registers a gem once for an event" do + path = lib_path(plugin_name) + index.register_plugin(plugin_name, + path.to_s, + [path.join("lib").to_s], + commands, + sources, + hooks + hooks) + expect(index.hook_plugins("after-bar")).to eq([plugin_name]) + end + context "that are not registered", :focused do let(:file) { double("index-file") } |