Sha256: 507909aa51cf14fd44826ea190e13a090c344b17fc7c5e03b3af23b0a6063d54

Contents?: true

Size: 761 Bytes

Versions: 2

Compression:

Stored size: 761 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/dir/self/ascend.rb
#
# Extracted Mon Mar 13 13:24:07 UTC 2006
# Unit Tools Reap Test Extractor
#

require 'facet/dir/self/ascend.rb'


  require 'test/unit'

  class TCDir < Test::Unit::TestCase

    def test_ascend_1
      c = []
      Dir.ascend( "this/path/up" ) do |path|
        c << path
      end
      assert_equal( 'this/path/up', c[0] )
      assert_equal( 'this/path', c[1] )
      assert_equal( 'this', c[2] )
    end

    def test_ascend_2
      c = []
      Dir.ascend( "this/path/up", false ) do |path|
        c << path
      end
      assert_equal( 'this/path', c[0] )
      assert_equal( 'this', c[1] )
    end

  end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facets-1.1.0 test/lib/facet/dir/self/test_ascend.rb
facets-1.2.0 test/lib/facet/dir/self/test_ascend.rb