summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/stat/new_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/stat/new_spec.rb')
-rw-r--r--spec/ruby/core/file/stat/new_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/ruby/core/file/stat/new_spec.rb b/spec/ruby/core/file/stat/new_spec.rb
index ec7d81362f..b8c3600028 100644
--- a/spec/ruby/core/file/stat/new_spec.rb
+++ b/spec/ruby/core/file/stat/new_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#initialize" do
@@ -13,12 +13,14 @@ describe "File::Stat#initialize" do
end
it "raises an exception if the file doesn't exist" do
- lambda { File::Stat.new(tmp("i_am_a_dummy_file_that_doesnt_exist")) }.should raise_error
+ -> {
+ File::Stat.new(tmp("i_am_a_dummy_file_that_doesnt_exist"))
+ }.should.raise(Errno::ENOENT)
end
it "creates a File::Stat object for the given file" do
st = File::Stat.new(@file)
- st.should be_kind_of(File::Stat)
+ st.should.is_a?(File::Stat)
st.ftype.should == 'file'
end