diff options
Diffstat (limited to 'spec/ruby/core/kernel/shared')
-rw-r--r-- | spec/ruby/core/kernel/shared/require.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/kernel/shared/require.rb b/spec/ruby/core/kernel/shared/require.rb index cfa1a4bbbd..52089f22fe 100644 --- a/spec/ruby/core/kernel/shared/require.rb +++ b/spec/ruby/core/kernel/shared/require.rb @@ -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 |