Sha256: 0272bbd1851e8bbb1cdd80505cc812bb79c9808bdc8f8f075ab3cb20361b47c5
Contents?: true
Size: 645 Bytes
Versions: 83
Compression:
Stored size: 645 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../../spec_helper' describe "File::Stat#initialize" do before :each do @file = tmp('i_exist') File.open(@file,'w'){|f| f.write 'rubinius'} File.chmod(0755, @file) end after :each do File.delete(@file) if File.exist?(@file) 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 end it "creates a File::Stat object for the given file" do st = File::Stat.new(@file) st.class.should == File::Stat st.ftype.should == 'file' end end
Version data entries
83 entries across 83 versions & 1 rubygems