diff options
Diffstat (limited to 'spec/ruby/core/file/readlink_spec.rb')
| -rw-r--r-- | spec/ruby/core/file/readlink_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/file/readlink_spec.rb b/spec/ruby/core/file/readlink_spec.rb index b529cd1355..568692b9b6 100644 --- a/spec/ruby/core/file/readlink_spec.rb +++ b/spec/ruby/core/file/readlink_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "File.readlink" do # symlink/readlink are not supported on Windows @@ -26,12 +26,12 @@ describe "File.readlink" do it "raises an Errno::ENOENT if there is no such file" do # TODO: missing_file - lambda { File.readlink("/this/surely/doesnt/exist") }.should raise_error(Errno::ENOENT) + -> { File.readlink("/this/surely/does/not/exist") }.should.raise(Errno::ENOENT) end it "raises an Errno::EINVAL if called with a normal file" do touch @file - lambda { File.readlink(@file) }.should raise_error(Errno::EINVAL) + -> { File.readlink(@file) }.should.raise(Errno::EINVAL) end end @@ -49,7 +49,7 @@ describe "File.readlink" do it "returns the name of the file referenced by the given link" do touch @file result = File.readlink(@link) - result.encoding.should equal Encoding.find('filesystem') + result.encoding.should.equal? Encoding.find('filesystem') result.should == @file.dup.force_encoding(Encoding.find('filesystem')) end end |
