mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@4f59d86
This commit is contained in:
parent
342fbae83c
commit
148961adcd
47 changed files with 725 additions and 61 deletions
|
@ -160,6 +160,14 @@ describe :kernel_require_basic, shared: true do
|
|||
ScratchPad.recorded.should == [:loaded]
|
||||
end
|
||||
|
||||
it "accepts an Object with #to_path in $LOAD_PATH" do
|
||||
obj = mock("to_path")
|
||||
obj.should_receive(:to_path).at_least(:once).and_return(CODE_LOADING_DIR)
|
||||
$LOAD_PATH << obj
|
||||
@object.send(@method, "load_fixture.rb").should be_true
|
||||
ScratchPad.recorded.should == [:loaded]
|
||||
end
|
||||
|
||||
it "does not require file twice after $LOAD_PATH change" do
|
||||
$LOAD_PATH << CODE_LOADING_DIR
|
||||
@object.require("load_fixture.rb").should be_true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue