PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/array/test_select.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 17 lines | 9 code | 7 blank | 1 comment | 1 complexity | cf9a7d9a29921e6d94e2ce56e9e57be0 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/array/select'
  2. require 'test/unit'
  3. class TC_Array_Select < Test::Unit::TestCase
  4. # select!
  5. def test_select!
  6. a = [1,2,3,4,5,6,7,8,9,10]
  7. a.select!{ |e| e % 2 == 0 }
  8. assert_equal( [2,4,6,8,10], a)
  9. end
  10. end