Skip to content

Commit 343824f

Browse files
CodeMeisterCopilot
authored andcommitted
Simplified removal of matching features
Co-authored-by: Copilot <[email protected]>
1 parent 48141f9 commit 343824f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.irbrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ def reload!
33
Object.send(:remove_const, :FactoryBot) if Object.const_defined?(:FactoryBot)
44

55
# Remove all files from the 'loaded' register
6-
$LOADED_FEATURES.grep(/factory_bot/).each do |path|
7-
$LOADED_FEATURES.delete(path)
8-
end
6+
$LOADED_FEATURES.delete_if { |path| path.match?(/factory_bot/) }
97

108
# re-load it again
119
require "factory_bot"

0 commit comments

Comments
 (0)