1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-09-29 19:13:37 +02:00
parent d51b4e34fb
commit 070cbe22b7
35 changed files with 127 additions and 133 deletions

View file

@ -20,7 +20,7 @@ describe :kernel_require_basic, shared: true do
it "raises a LoadError if the file does not exist" do
path = File.expand_path "nonexistent.rb", CODE_LOADING_DIR
File.exist?(path).should be_false
File.should_not.exist?(path)
-> { @object.send(@method, path) }.should raise_error(LoadError)
ScratchPad.recorded.should == []
end
@ -41,7 +41,7 @@ describe :kernel_require_basic, shared: true do
end
it "raises a LoadError" do
File.exist?(@path).should be_true
File.should.exist?(@path)
-> { @object.send(@method, @path) }.should raise_error(LoadError)
end
end
@ -247,7 +247,7 @@ describe :kernel_require, shared: true do
describe "(file extensions)" do
it "loads a .rb extensioned file when passed a non-extensioned path" do
path = File.expand_path "load_fixture", CODE_LOADING_DIR
File.exist?(path).should be_true
File.should.exist?(path)
@object.require(path).should be_true
ScratchPad.recorded.should == [:loaded]
end
@ -271,7 +271,7 @@ describe :kernel_require, shared: true do
it "loads a .rb extensioned file when passed a non-.rb extensioned path" do
path = File.expand_path "load_fixture.ext", CODE_LOADING_DIR
File.exist?(path).should be_true
File.should.exist?(path)
@object.require(path).should be_true
ScratchPad.recorded.should == [:loaded]
end