Sha256: cfd57a94ba2743f53df336cc0588bcf34ba6e066b75397bd82542445dc0c6d1f
Contents?: true
Size: 1016 Bytes
Versions: 83
Compression:
Stored size: 1016 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "File.ctime" do before :each do @file = File.join(__rhoGetCurrentDir(), __FILE__).gsub(/\.rb/,".iseq") end after :each do @file = nil end it "Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself)." do File.ctime(@file) File.ctime(@file).class.should == Time end it "raises an Errno::ENOENT exception if the file is not found" do lambda { File.ctime('bogus') }.should raise_error(Errno::ENOENT) end end describe "File#ctime" do before :each do @file = File.open(File.join(__rhoGetCurrentDir(), __FILE__).gsub(/\.rb/,".iseq")) end after:each do @file.close @file = nil end it "Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself)." do @file.ctime @file.ctime.class.should == Time end end
Version data entries
83 entries across 83 versions & 1 rubygems