/vendor/gems/facets-2.4.5/test/core/string/test_each_word.rb
Ruby | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | eb489cf39d94daa4de4cec361bd1c9d3 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/string/each_word.rb'
- require 'test/unit'
- class Test_String_EachWord < Test::Unit::TestCase
- def test_each_word
- a = []
- i = "this is a test"
- i.each_word{ |w| a << w }
- assert_equal( ['this', 'is', 'a', 'test'], a )
- end
- end