Sha256: 39ad5ef8a63215452cbbd00dfc2a67ad726b410c91e767e0b609c9db6d7bd2be
Contents?: true
Size: 475 Bytes
Versions: 16
Compression:
Stored size: 475 Bytes
Contents
require 'facets/dir/ascend' require 'test/unit' require 'tmpdir' class TC_Dir_Descend < Test::Unit::TestCase def setup @location = File.join(Dir.tmpdir, self.class.name, Time.now.usec.to_s) @startdir = File.join(@location) end def test_descend c = [] Dir.descend(@startdir) do |path| c << path end rdir = @startdir c.reverse_each do |d| assert_equal(rdir, d) rdir = File.dirname(rdir) end end end
Version data entries
16 entries across 16 versions & 1 rubygems