Sha256: d33acaa82bc1878ecb7ffa27fc4ddc5e44ce3a7ea95c05ae23e373f334952a46

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

require 'helper'

class TestSplitArray < Test::Unit::TestCase
  should "return a standard array unscathed" do
    assert_equal [1, 2, 3, 4], Tickly.split_array([1,2,3,4])
  end
  
  should "return a split array on nil" do
    assert_equal [[1, 2],  [3, 4]], Tickly.split_array([1, 2, nil,  3, 4])
  end
  
  class Jock < Array; end
  
  should "properly use subclasses" do
    s =  Tickly.split_array(Jock.new([1, 2, nil,  3, 4]))
    assert_kind_of Jock, s
    assert_kind_of Jock, s[0]
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tickly-0.0.2 test/test_split_array.rb
tickly-0.0.1 test/test_split_array.rb