corrected example code in test_each_can_use_curly_brace_blocks_too

test_each_can_use_curly_brace_blocks_too was using the do-end block instead of the curly brace syntax for the each method.
This commit is contained in:
Adler Santos
2013-06-03 02:18:29 +08:00
parent 610e219fa5
commit dfaeb570e5

View File

@@ -39,9 +39,7 @@ class AboutIteration < Neo::Koan
def test_each_can_use_curly_brace_blocks_too
array = [1, 2, 3]
sum = 0
array.each do |item|
sum += item
end
array.each { |item| sum += item }
assert_equal __(6), sum
end