Sha256: 015a9eb21ba44e18ba280d437e4b9e15737447c283a44d34ceed67c865ece14b
Contents?: true
Size: 646 Bytes
Versions: 12
Compression:
Stored size: 646 Bytes
Contents
describe File do before :all do @file_name = "blah.temp" @ext = File.extname(@file_name) @base = File.basename(@file_name, @ext) end it ".path returns unique file path" do expected_path = File.join(Dir.pwd, "results/files/#{@base}_.*#{@ext}") File.path(@file_name).should =~ Regexp.new(expected_path) end it ".native_path returns unique file path with native path separator" do expected_path = File.join(Dir.pwd, "results/files/#{@base}_.*#{@ext}").gsub("/", "\\") File.native_path(File.path(@file_name)).should =~ Regexp.new(Regexp.escape(expected_path).gsub("\\.\\*", ".*")) end end
Version data entries
12 entries across 12 versions & 1 rubygems