Today we have documentation and code implementation in the same file:
# @returns <String> A combined string
def say :this :that
return "#{this} "{that}"
end
I have never seen unit testing in the same file like:
# @if_insert "good", "morning"
# @should_return "good morning"
#
# @returns <String> A combined string
def say :this :that
return "#{this} "{that}"
end
I think all these three parts are better to be clustered at one place (but with better syntax than the above quick examples)
Isn't it better not divide the unit testing from the actual code implementation? I don't see any benefit doing so, just like we are not separating documentations from code implementations.