/vendor/gems/facets-2.4.5/test/core/string/test_each_word.rb

https://bitbucket.org/mediashelf/fedora-migrator · Ruby · 14 lines · 10 code · 4 blank · 0 comment · 0 complexity · eb489cf39d94daa4de4cec361bd1c9d3 MD5 · raw file

  1. require 'facets/string/each_word.rb'
  2. require 'test/unit'
  3. class Test_String_EachWord < Test::Unit::TestCase
  4. def test_each_word
  5. a = []
  6. i = "this is a test"
  7. i.each_word{ |w| a << w }
  8. assert_equal( ['this', 'is', 'a', 'test'], a )
  9. end
  10. end