Sha256: 91042a9d03f517b818b1ab75d1b64c35f2471d747fd5fa765faeee0a61b4c75b
Contents?: true
Size: 794 Bytes
Versions: 83
Compression:
Stored size: 794 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "File.utime" do before :each do @atime = Time.now @mtime = Time.now @file1 = tmp("specs_file_utime1") @file2 = tmp("specs_file_utime2") File.open(@file1, "w") {} File.open(@file2, "w") {} end after :each do File.delete(@file1) if File.exist?(@file1) File.delete(@file2) if File.exist?(@file2) end it "sets the access and modification time of each file" do File.utime(@atime, @mtime, @file1, @file2) File.atime(@file1).to_i.should be_close(@atime.to_i, 2) File.mtime(@file1).to_i.should be_close(@mtime.to_i, 2) File.atime(@file2).to_i.should be_close(@atime.to_i, 2) File.mtime(@file2).to_i.should be_close(@mtime.to_i, 2) end end
Version data entries
83 entries across 83 versions & 1 rubygems