summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/plugin/events_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/bundler/plugin/events_spec.rb')
-rw-r--r--spec/bundler/bundler/plugin/events_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/bundler/bundler/plugin/events_spec.rb b/spec/bundler/bundler/plugin/events_spec.rb
index b09e915682..28d70c6fdd 100644
--- a/spec/bundler/bundler/plugin/events_spec.rb
+++ b/spec/bundler/bundler/plugin/events_spec.rb
@@ -2,10 +2,14 @@
RSpec.describe Bundler::Plugin::Events do
context "plugin events" do
+ before { Bundler::Plugin::Events.send :reset }
+
describe "#define" do
it "raises when redefining a constant" do
+ Bundler::Plugin::Events.send(:define, :TEST_EVENT, "foo")
+
expect do
- Bundler::Plugin::Events.send(:define, :GEM_BEFORE_INSTALL_ALL, "another-value")
+ Bundler::Plugin::Events.send(:define, :TEST_EVENT, "bar")
end.to raise_error(ArgumentError)
end