Sha256: 1281e347b421b0678b928add29d987eed5f2581f265faad6c2a3520f3e7eb870
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/string/cleave.rb # # Extracted Fri Feb 16 02:00:37 EST 2007 # Project.rb Test Extraction # require 'facets/core/string/cleave.rb' require 'test/unit' class StringCleaveTest < Test::Unit::TestCase def test_nospaces assert_equal [ 'whole', '' ], 'whole'.cleave assert_equal [ 'Supercalifragilisticexpialidocious', '' ], 'Supercalifragilisticexpialidocious'.cleave end def test_exact_middle assert_equal [ 'fancy', 'split' ], 'fancy split'.cleave assert_equal [ 'All good Rubyists', 'know how to party' ], 'All good Rubyists know how to party'.cleave end def test_closer_to_start assert_equal [ 'short', 'splitter' ], 'short splitter'.cleave assert_equal [ 'Four score and', 'seven years ago...' ], 'Four score and seven years ago...'.cleave assert_equal [ 'abc def', 'ghijklm nop' ], 'abc def ghijklm nop'.cleave end def test_closer_to_end assert_equal [ 'extended', 'split' ], 'extended split'.cleave assert_equal [ 'abc defghi', 'jklm nop' ], 'abc defghi jklm nop'.cleave end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/string/test_cleave.rb |