Sha256: ed5ae9a723d1794dffd933c6c3f650359d553cc37a246315fe0e86e6c1a35ef1
Contents?: true
Size: 640 Bytes
Versions: 24
Compression:
Stored size: 640 Bytes
Contents
require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb') require 'scout/path' require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1') class TestPathUtil < Test::Unit::TestCase def test_dirname p = Path.setup("/usr/share/scout/data") assert_equal "/usr/share/scout", p.dirname end def test_glob TmpFile.in_dir :erase => false do |tmpdir| Path.setup tmpdir File.write(tmpdir.foo, 'foo') File.write(tmpdir.bar, 'bar') assert_equal 2, tmpdir.glob.length assert_equal %w(foo bar).sort, tmpdir.glob.collect{|p| p.basename }.sort end end end
Version data entries
24 entries across 24 versions & 2 rubygems