Sha256: 9bee0ca7df11f8e3d520a12777d7dc4b458fdf7dc7051b5ed2186119ba38c7d0

Contents?: true

Size: 399 Bytes

Versions: 5

Compression:

Stored size: 399 Bytes

Contents

require 'helper'

class TestMwkRubyUtils < Test::Unit::TestCase
  should "join" do
    assert_equal ['a', nil, 'b'].present_join, "a, b"
  end
  
  should "hashify numbers" do
    assert_equal [1, 2, 3].hashify_single, {1 => 1, 2 => 2, 3 => 3}
  end

  should "hashify with a sym" do
    assert_equal [[1, 1], [2, 2], [3,3]].hashify_single(:first), {1 => [1, 1], 2 => [2, 2], 3 => [3, 3]}
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mwk-ruby-utils-0.5.0 test/test_mwk-ruby-utils.rb
mwk-ruby-utils-0.4.0 test/test_mwk-ruby-utils.rb
mwk-ruby-utils-0.3.1 test/test_mwk-ruby-utils.rb
mwk-ruby-utils-0.3.0 test/test_mwk-ruby-utils.rb
mwk-ruby-utils-0.2.0 test/test_mwk-ruby-utils.rb