dimanche 28 décembre 2014

Ruby now can be unit test done on print method

How can be unit test done on the following printing method call get_list(). With assert_equal("["apple", "orange", "pear"]",@list.get_list()) result is nill



@list = ["apple", "orange", "pear"]

def get_list()
i = 0
while (i < list.size())
puts list[i]
i = i + 1
end
end


Please can somebody give me tip please


Aucun commentaire:

Enregistrer un commentaire