Sha256: b91e19a1f597bf3ffa7f0b6b311dd4bc8235c65f8dabd7965be62aa59def865f

Contents?: true

Size: 485 Bytes

Versions: 7

Compression:

Stored size: 485 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |
#   |_|\___||___/\__|
#

require 'facets/string/filter.rb'

require 'test/unit'

class TestStringFilter < 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

7 entries across 7 versions & 1 rubygems

Version Path
facets-2.0.4 test/unit/string/test_filter.rb
facets-2.1.0 test/unit/string/test_filter.rb
facets-2.0.3 test/unit/string/test_filter.rb
facets-2.0.5 test/unit/string/test_filter.rb
facets-2.1.1 test/unit/string/test_filter.rb
facets-2.1.2 test/unit/string/test_filter.rb
facets-2.1.3 test/unit/string/test_filter.rb