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