Sha256: dd24e7580077391cd652a3efe0ac8cf4df277d032d15f121b4a6bcabb04e1ca0
Contents?: true
Size: 665 Bytes
Versions: 5
Compression:
Stored size: 665 Bytes
Contents
# -*- encoding: utf-8 -*- require 'test/unit' require 'webgen/common' class TestCommon < Test::Unit::TestCase def test_absolute_path assert_raise(ArgumentError) { Webgen::Common.absolute_path('test', 'test') } assert_equal('/', Webgen::Common.absolute_path('/', '/')) assert_equal('/dir', Webgen::Common.absolute_path('/dir', '/other')) assert_equal('/other/dir', Webgen::Common.absolute_path('dir', '/other')) assert_equal('/test/dir', Webgen::Common.absolute_path('../test/dir', '/other')) assert_equal('/', Webgen::Common.absolute_path('/..', '/')) assert_equal('/dir', Webgen::Common.absolute_path('/../dir/.', '/')) end end
Version data entries
5 entries across 5 versions & 3 rubygems