summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Jonsson <olle.jonsson@gmail.com>2018-11-10 23:10:54 -0800
committerGitHub <noreply@github.com>2018-11-10 23:10:54 -0800
commit2bf93186c42a1a13e822fe1fedcc811ec210b87b (patch)
tree5cc1ec65201bb8ef807926d50cfa69f1c86ab3d7
parenta0a599ad3bd74e5fe51906d5cb5fd4405258976c (diff)
downloadbundler-segiddins/6771-uniq-hook-registration.tar.gz
Double-register hook in spec segiddins/6771-uniq-hook-registration
To make it clear the list is uniq’d Co-Authored-By: segiddins <segiddins@segiddins.me>
-rw-r--r--spec/bundler/plugin/index_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/bundler/plugin/index_spec.rb b/spec/bundler/plugin/index_spec.rb
index 4969e0cd55..1f3dd62d0c 100644
--- a/spec/bundler/plugin/index_spec.rb
+++ b/spec/bundler/plugin/index_spec.rb
@@ -88,7 +88,12 @@ RSpec.describe Bundler::Plugin::Index do
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)
+ 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