Sha256: a43d85ad6b4b01dad21082f0e4f4b00f269046e61a2d95b5414789877592f7ec
Contents?: true
Size: 805 Bytes
Versions: 59
Compression:
Stored size: 805 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "File#path" do before :each do @file1 = "testfile" @file2 = tmp("../tmp/xxx") end after :each do File.delete(@file1) if File.exist?(@file1) File.delete(@file2) if File.exist?(@file2) end it "returns the pathname used to create file as a string" do File.open(@file1,'w'){|file| file.path.should == "testfile"} File.open(@file2, 'w'){|file| file.path.should == tmp("../tmp/xxx")} unless System.get_property('platform') == 'WINDOWS' end end describe "File.path" do before :each do @file1 = tmp("../tmp/xxx") end ruby_version_is "1.9.1" do it "returns the full path for the given file" do File.path(@file1).should == tmp("../tmp/xxx") end end end
Version data entries
59 entries across 59 versions & 1 rubygems