Class: TestArray

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/test/unit/array_test.rb

Instance Method Summary collapse

Instance Method Details

#test_hashify_with_countsObject



4
5
6
7
8
9
# File 'lib/test/unit/array_test.rb', line 4

def test_hashify_with_counts
  assert_equal(
    {"omnicat" => 2, "written" => 1, "at" => 1, "2011" => 1},
    ["omnicat", "written", "at", "2011", "omnicat"].hashify_with_counts
  )
end