Sha256: 66aa3612c0df6dbabd925c158f90c491cf2cc333d02360f2e878da50b0698346

Contents?: true

Size: 605 Bytes

Versions: 8

Compression:

Stored size: 605 Bytes

Contents

class File
  class << self
    # returns unique file path for use in the examples
    #
    # all file names generated with this method will
    # be shown on the report upon test failure.
    def path(file_name, description=nil)
      WatirSplash::SpecHelper.formatter.file_path(file_name, description)
    end

    # returns native file path
    # e.g. on Windows:
    #   native_file_path("c:/blah/blah2/file.txt") => c:\\blah\\blah2\\file.txt
    def native_path(file_path)
      File::ALT_SEPARATOR ? file_path.gsub(File::SEPARATOR, File::ALT_SEPARATOR) : file_path
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
watirsplash-0.2.14 lib/watirsplash/file_helper.rb
watirsplash-0.2.12 lib/watirsplash/file_helper.rb
watirsplash-0.2.11 lib/watirsplash/file_helper.rb
watirsplash-0.2.10 lib/watirsplash/file_helper.rb
watirsplash-0.2.9 lib/watirsplash/file_helper.rb
watirsplash-0.2.8 lib/watirsplash/file_helper.rb
watirsplash-0.2.7 lib/watirsplash/file_helper.rb
watirsplash-0.2.6 lib/watirsplash/file_helper.rb