Sha256: 4b111402debc55311a96dc9bb365d756a6cbb334910b3b3bd6c568fe6e70c33f
Contents?: true
Size: 568 Bytes
Versions: 12
Compression:
Stored size: 568 Bytes
Contents
# Test for facets/file/topath.rb require 'facets/file/split_all.rb' require 'test/unit' class TC_File_Split_All < Test::Unit::TestCase # mock file class MockFile < File def self.open( fname, mode, &blk ) blk.call(self) end def self.read( fname=nil ) @mock_content.clone end def self.write( str ) @mock_content = str end def self.<<( str ) (@mock_content ||="") << str end end def test_split_all fp = "this/is/test" assert_equal( ['this', 'is', 'test'], MockFile.split_all(fp) ) end end
Version data entries
12 entries across 12 versions & 1 rubygems