PageRenderTime 256ms CodeModel.GetById 120ms app.highlight 13ms RepoModel.GetById 119ms 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
 1require 'facets/array/select'
 2require 'test/unit'
 3
 4class TC_Array_Select < Test::Unit::TestCase
 5
 6  # select!
 7
 8  def test_select!
 9    a = [1,2,3,4,5,6,7,8,9,10]
10    a.select!{ |e| e % 2 == 0 }
11    assert_equal( [2,4,6,8,10], a)
12  end
13
14end
15
16
17