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

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.2 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.0 spec/framework_spec/app/spec/core/file/ctime_spec.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/core/file/ctime_spec.rb