We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c94a6a commit 150a1aeCopy full SHA for 150a1ae
spec/ruby/core/kernel/shared/require.rb
@@ -160,6 +160,14 @@
160
ScratchPad.recorded.should == [:loaded]
161
end
162
163
+ it "accepts an Object with #to_path in $LOAD_PATH" do
164
+ obj = mock("to_path")
165
+ obj.should_receive(:to_path).at_least(:once).and_return(CODE_LOADING_DIR)
166
+ $LOAD_PATH << obj
167
+ @object.send(@method, "load_fixture.rb").should be_true
168
+ ScratchPad.recorded.should == [:loaded]
169
+ end
170
+
171
it "does not require file twice after $LOAD_PATH change" do
172
$LOAD_PATH << CODE_LOADING_DIR
173
@object.require("load_fixture.rb").should be_true
0 commit comments