summaryrefslogtreecommitdiff
path: root/lib/bundler/plugin
diff options
context:
space:
mode:
authorjules2689 <julian@jnadeau.ca>2018-05-31 20:35:55 +0900
committerjules2689 <julian@jnadeau.ca>2018-05-31 20:35:55 +0900
commit39fb5fd9b3f9034780270ffbdb150200c8ce923a (patch)
tree17327339307c490423808350cd204866db01c816 /lib/bundler/plugin
parentfdddb742067a3d8aee0b782d820305494d7b06c9 (diff)
downloadbundler-39fb5fd9b3f9034780270ffbdb150200c8ce923a.tar.gz
Fix a spec comparison, reset events in tests to avoid test order issues
Diffstat (limited to 'lib/bundler/plugin')
-rw-r--r--lib/bundler/plugin/events.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bundler/plugin/events.rb b/lib/bundler/plugin/events.rb
index 8e94644f2a..4026a06604 100644
--- a/lib/bundler/plugin/events.rb
+++ b/lib/bundler/plugin/events.rb
@@ -14,6 +14,14 @@ module Bundler
end
private_class_method :define
+ def self.reset
+ @events.each do |_, const|
+ remove_const(const)
+ end
+ @events = nil
+ end
+ private_class_method :reset
+
# Check if an event has been defined
# @param event [String] An event to check
# @return [Boolean] A boolean indicating if the event has been defined