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

Version Path
facets-2.8.4 test/core/dir/test_descend.rb
facets-2.8.3 test/core/dir/test_descend.rb
facets-2.8.2 test/core/dir/test_descend.rb
facets-2.8.1 test/core/dir/test_descend.rb
facets-2.8.0 test/core/dir/test_descend.rb
facets-2.7.0 test/core/dir/test_descend.rb
facets-2.6.0 test/core/dir/test_descend.rb
facets-2.4.0 test/dir/test_descend.rb
facets-2.4.1 test/dir/test_descend.rb
facets-2.4.3 test/core/dir/test_descend.rb
facets-2.4.4 test/core/dir/test_descend.rb
facets-2.4.2 test/core/dir/test_descend.rb
facets-2.5.1 test/core/dir/test_descend.rb
facets-2.5.0 test/core/dir/test_descend.rb
facets-2.4.5 test/core/dir/test_descend.rb
facets-2.5.2 test/core/dir/test_descend.rb