Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
Danish Khan committed Mar 4, 2011
1 parent ab74af5 commit 099c978
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions koans/about_hashes.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ def test_hash_keys


def test_hash_values def test_hash_values
hash = { :one => "uno", :two => "dos" } hash = { :one => "uno", :two => "dos" }
assert_equal __, hash.values.size assert_equal 2, hash.values.size
assert_equal __, hash.values.include?("uno") assert_equal true, hash.values.include?("uno")
assert_equal __, hash.values.include?("dos") assert_equal true, hash.values.include?("dos")
assert_equal __, hash.values.class assert_equal Array, hash.values.class
end end


def test_combining_hashes def test_combining_hashes
hash = { "jim" => 53, "amy" => 20, "dan" => 23 } hash = { "jim" => 53, "amy" => 20, "dan" => 23 }
new_hash = hash.merge({ "jim" => 54, "jenny" => 26 }) new_hash = hash.merge({ "jim" => 54, "jenny" => 26 })


assert_equal __, hash != new_hash assert_equal true, hash != new_hash


expected = { "jim" => __, "amy" => 20, "dan" => 23, "jenny" => __ } expected = { "jim" => 54, "amy" => 20, "dan" => 23, "jenny" => 26 }
assert_equal __, expected == new_hash assert_equal true, expected == new_hash
end end
end end

0 comments on commit 099c978

Please sign in to comment.