Sha256: c0150b646e65061d65445e7d2369654ecabc66879b971ebf55a6d0d5ce3b175c
Contents?: true
Size: 1.12 KB
Versions: 19
Compression:
Stored size: 1.12 KB
Contents
require 'test/unit' require 'rvc/path' class ParsePathTest < Test::Unit::TestCase def test_empty els, absolute, trailing_slash = RVC::Path.parse('') assert_equal [], els assert_equal false, absolute assert_equal false, trailing_slash end def test_root els, absolute, trailing_slash = RVC::Path.parse('/') assert_equal [], els assert_equal true, absolute assert_equal true, trailing_slash end def test_normal els, absolute, trailing_slash = RVC::Path.parse('/foo/bar') assert_equal %w(foo bar), els assert_equal true, absolute assert_equal false, trailing_slash els, absolute, trailing_slash = RVC::Path.parse('/foo/bar/') assert_equal %w(foo bar), els assert_equal true, absolute assert_equal true, trailing_slash els, absolute, trailing_slash = RVC::Path.parse('foo/bar/') assert_equal %w(foo bar), els assert_equal false, absolute assert_equal true, trailing_slash els, absolute, trailing_slash = RVC::Path.parse('foo/bar') assert_equal %w(foo bar), els assert_equal false, absolute assert_equal false, trailing_slash end end
Version data entries
19 entries across 19 versions & 1 rubygems