Sha256: c26146bd1ce33c57e8f0389ac1073cb7a4a2077caae7433cf086ae797c98ea9b

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/nano/dir/self/ls_r.rb
#
# Extracted Fri Oct 28 14:20:18 EDT 2005
# Unit Tools Reap Test Extractor
#

require 'nano/dir/self/ls_r.rb'


  require 'test/unit'

  # FIND TEST DIRECTORY
  paths = File.expand_path(File.dirname(__FILE__)).split('/')
  paths.size.downto(1) do |i|
    f = (paths.slice(0..i)+['test']).join('/')
    $TESTDIR = File.join(f,'FIXTURE') if File.directory?(f)
  end
  raise unless $TESTDIR

  class TCDir < Test::Unit::TestCase

    def test_ls_r
      td = Dir.pwd
      Dir.chdir $TESTDIR
        r = ["A", "A/B","A/B/C.txt", "A/B.txt", "A.txt"].collect{ |e| 
          File.join( 'ls_r', e )
        }
        fs = Dir.ls_r( 'ls_r' )
        assert_equal( r, fs, Dir.pwd  )
      Dir.chdir td
    end

    def test_recurse
      td = Dir.pwd
      Dir.chdir $TESTDIR
        r = ["A", "A/B","A/B/C.txt", "A/B.txt", "A.txt"].collect{ |e| 
          File.join( 'ls_r', e )
        }
        fs = Dir.recurse( 'ls_r' )
        assert_equal( r, fs, Dir.pwd )
      Dir.chdir td
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-0.9.0 test/lib/nano/dir/self/test_ls_r.rb