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

Version Path
watirsplash-2.0.0.rc1 spec/file_helper_spec.rb
watirsplash-1.4.3 spec/file_helper_spec.rb
watirsplash-1.4.2 spec/file_helper_spec.rb
watirsplash-1.4.1 spec/file_helper_spec.rb
watirsplash-1.4.0 spec/file_helper_spec.rb
watirsplash-1.3.0 spec/file_helper_spec.rb
watirsplash-1.2.1 spec/file_helper_spec.rb
watirsplash-1.2.0 spec/file_helper_spec.rb
watirsplash-1.1.2 spec/file_helper_spec.rb
watirsplash-1.1.1 spec/file_helper_spec.rb
watirsplash-1.1.0 spec/file_helper_spec.rb
watirsplash-1.0.0 spec/file_helper_spec.rb