Sha256: 7625372744e30b2baaf4a0ee79c9580435b2b2d74f1f70ba4c52150af13980d2

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

require 'rubygems'
require 'redgreen'
require 'lib/keystone/core_ext'

class TestCoreExt < Test::Unit::TestCase
  def setup
  end  
  
  def test_array_split_by
    assert_equal([1,2,3,4,5,6,7,8,9].split_by(3),[[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    assert_equal([1,2,3,4,5,6,7,8,9,10].split_by(2),[[1,2],[3,4],[5,6],[7,8],[9,10]])
    assert_equal([].split_by(3),[[]])
    assert_equal([[1,2,3,4],[1,23],[2,33],[[4]]].split_by(3),[[[1, 2, 3, 4], [1, 23], [2, 33]], [[[4]]]])
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kanamei-keystone-0.0.20 test/test_core_ext.rb
kanamei-keystone-0.0.21 test/test_core_ext.rb
kanamei-keystone-0.0.22 test/test_core_ext.rb
kanamei-keystone-0.0.23 test/test_core_ext.rb
kanamei-keystone-0.0.24 test/test_core_ext.rb
kanamei-keystone-0.0.25 test/test_core_ext.rb
kanamei-keystone-0.0.26 test/test_core_ext.rb
kanamei-keystone-0.0.27 test/test_core_ext.rb