diff options
Diffstat (limited to 'spec/ruby/core/file/shared/stat.rb')
| -rw-r--r-- | spec/ruby/core/file/shared/stat.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/file/shared/stat.rb b/spec/ruby/core/file/shared/stat.rb index aac710dd2f..879a7f11ff 100644 --- a/spec/ruby/core/file/shared/stat.rb +++ b/spec/ruby/core/file/shared/stat.rb @@ -10,13 +10,13 @@ describe :file_stat, shared: true do it "returns a File::Stat object if the given file exists" do st = File.send(@method, @file) - st.should be_an_instance_of(File::Stat) + st.should.instance_of?(File::Stat) end it "returns a File::Stat object when called on an instance of File" do File.open(@file) do |f| st = f.send(@method) - st.should be_an_instance_of(File::Stat) + st.should.instance_of?(File::Stat) end end @@ -25,8 +25,8 @@ describe :file_stat, shared: true do end it "raises an Errno::ENOENT if the file does not exist" do - lambda { + -> { File.send(@method, "fake_file") - }.should raise_error(Errno::ENOENT) + }.should.raise(Errno::ENOENT) end end |
