Commit 7380acf1 authored by Jun Hiroe's avatar Jun Hiroe

Add Enumerable#sort_by test

parent 2f8dbd8e
......@@ -41,3 +41,7 @@ assert("Enumerable#group_by") do
assert_equal [1, 4], r[1]
assert_equal [2, 5], r[2]
end
assert("Enumerable#sort_by") do
assert_equal ["car", "train", "bicycle"], %w{car bicycle train}.sort_by {|e| e.length}
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment