summaryrefslogtreecommitdiff
path: root/spec/bundler/support
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2021-01-28 17:55:26 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2021-01-28 18:00:10 +0900
commit7cd97a81d1010ec8f10585d86e7271a4a40e3990 (patch)
tree5d77a3f0526682aef9a169650e8c61c0c99db7d8 /spec/bundler/support
parent00bd645f09ef96af55e4060deee7882a46d33206 (diff)
Remove require_path from $LOADED_FEATURES
because some features are already loaded.
Diffstat (limited to 'spec/bundler/support')
-rw-r--r--spec/bundler/support/matchers.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/bundler/support/matchers.rb b/spec/bundler/support/matchers.rb
index 3d926f5774..6c9ab0d410 100644
--- a/spec/bundler/support/matchers.rb
+++ b/spec/bundler/support/matchers.rb
@@ -127,6 +127,7 @@ module Spec
code << "exclude_from_load_path = File.expand_path('#{exclude_from_load_path}')"
code << "$LOAD_PATH.delete_if { |path| File.expand_path(path) == exclude_from_load_path }"
end
+ code << "$LOADED_FEATURES.delete_if { |feature| File.basename(feature, '.*') == '#{require_path}' }"
code << "require '#{require_path}.rb'"
code << "puts #{version_const}"
run code.join("; "), *groups