Sha256: 02b5416b4c45892379ce97cd81a1b2112d68e9f61dc01706fa7b2a2308efc3c8
Contents?: true
Size: 367 Bytes
Versions: 6
Compression:
Stored size: 367 Bytes
Contents
require 'test/unit' require 'english/censor' class TC_String_Censor < Test::Unit::TestCase def test_word_filter s = "this is a test" n = s.word_filter{ |w| "#{w}1" } assert_equal( 'this1 is1 a1 test1', n ) end def test_word_filter! s = "this is a test" s.word_filter!{ |w| "#{w}1" } assert_equal( 'this1 is1 a1 test1', s ) end end
Version data entries
6 entries across 6 versions & 1 rubygems