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

Version Path
etapper-0.0.5 vendor/gems/english-0.3.1/test/test_censor.rb
etapper-0.0.4 vendor/gems/english-0.3.1/test/test_censor.rb
etapper-0.0.3 vendor/gems/english-0.3.1/test/test_censor.rb
etapper-0.0.2 vendor/gems/english-0.3.1/test/test_censor.rb
etapper-0.0.1 vendor/gems/english-0.3.1/test/test_censor.rb
etapper-0.0.0 vendor/gems/english-0.3.1/test/test_censor.rb