Commit 2f952a8f authored by yui-knk's avatar yui-knk

Change to use assert method.

parent 229e7fe2
...@@ -107,15 +107,17 @@ assert('Enumerable#member?', '15.3.2.2.15') do ...@@ -107,15 +107,17 @@ assert('Enumerable#member?', '15.3.2.2.15') do
end end
assert('Enumerable#partion', '15.3.2.2.16') do assert('Enumerable#partion', '15.3.2.2.16') do
[0,1,2,3,4,5,6,7,8,9].partition do |i| partition = [0,1,2,3,4,5,6,7,8,9].partition do |i|
i % 2 == 0 i % 2 == 0
end == [[0,2,4,6,8], [1,3,5,7,9]] end
assert_equal [[0,2,4,6,8], [1,3,5,7,9]], partition
end end
assert('Enumerable#reject', '15.3.2.2.17') do assert('Enumerable#reject', '15.3.2.2.17') do
[0,1,2,3,4,5,6,7,8,9].reject do |i| reject = [0,1,2,3,4,5,6,7,8,9].reject do |i|
i % 2 == 0 i % 2 == 0
end == [1,3,5,7,9] end
assert_equal [1,3,5,7,9], reject
end end
assert('Enumerable#select', '15.3.2.2.18') do assert('Enumerable#select', '15.3.2.2.18') do
......
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