This probably isn\'t something you should try at home, but for some reason or another I tried to create an array of methods in Ruby.
I started by defining two methods.>
If you had a square
method and wanted to create an array with the square values of 2 and 4, you would write
array = [square(2), square(4)]
Here you are doing exactly the same thing, except that your test methods don't return anything and that's why your final array
seems empty (actually, it contains [nil, nil]
).