diff options
author | Colby Swandale <me@colby.fyi> | 2019-04-05 20:31:41 +1100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-27 13:03:20 +0200 |
commit | ee866a7df9efc18d72bd305d43e072cc54d45733 (patch) | |
tree | 0b37cf40af924122f354490a7b95b0e69c53c19c | |
parent | 875f255d252bab65fbac0c6ff018d889a5160609 (diff) | |
download | bundler-ee866a7df9efc18d72bd305d43e072cc54d45733.tar.gz |
Fix test in bundler plugin events spec that was depending on specific
constants
This test was relying on a specifc constant to already be defined for the test to
pass. There is another test in `spec/bundler/plugin_spec.rb` that was
resetting these constants and causing this test to fail
-rw-r--r-- | spec/bundler/plugin/events_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/bundler/plugin/events_spec.rb b/spec/bundler/plugin/events_spec.rb index b09e915682..28d70c6fdd 100644 --- a/spec/bundler/plugin/events_spec.rb +++ b/spec/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 |