Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 69a0c8b

Browse files
committed
As each file is required, push it onto requires
1 parent 3f10b72 commit 69a0c8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/rspec/core/configuration.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -1604,8 +1604,10 @@ def configure_example(example, example_hooks)
16041604
def requires=(paths)
16051605
directories = ['lib', default_path].select { |p| File.directory? p }
16061606
RSpec::Core::RubyProject.add_to_load_path(*directories)
1607-
paths.each { |path| load_file_handling_errors(:require, path) }
1608-
@requires += paths
1607+
paths.each { |path|
1608+
load_file_handling_errors(:require, path)
1609+
@requires << path
1610+
}
16091611
end
16101612

16111613
# @private

0 commit comments

Comments
 (0)