Sha256: 5f7b6144182696c798c3796e09362c0ba7cef3a5bc2d1d7908728411537ac874
Contents?: true
Size: 288 Bytes
Versions: 16
Compression:
Stored size: 288 Bytes
Contents
require 'facets/string/shatter' require 'test/unit' class TC_String_Shatter < Test::Unit::TestCase def test_shatter s = "<p>This<b>is</b>a test.</p>" sh = s.shatter( /<.*?>/ ) e = ["<p>", "This", "<b>", "is", "</b>", "a test.", "</p>"] assert_equal(e, sh) end end
Version data entries
16 entries across 16 versions & 1 rubygems