Sha256: 7021b4f29d7fc2965ca78c60b3a5206211f198a9f75995982743532ca8dc4c82

Contents?: true

Size: 410 Bytes

Versions: 3

Compression:

Stored size: 410 Bytes

Contents

# Test for facets/string/filter

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

3 entries across 3 versions & 1 rubygems

Version Path
facets-2.3.0 test/core/string/test_filter.rb
facets-2.2.0 test/unit/string/test_filter.rb
facets-2.2.1 test/unit/string/test_filter.rb