Quantcast
Channel: Dave Copeland :ruby:
Viewing all articles
Browse latest Browse all 596

Article 5

$
0
0

gist.github.com/davetron5000/4

I don't see a reason to test for `nil` by default, but if there ARE reasons, then I would add a test for that (and change the code to throw ArgumentError in the constructor, again without additional reasons to do something else).

Note that I DO test both 18 and more than 18 because bugs lie on these boundaries and our culture often uses the phrase "over 18" to mean “18 or over”.
ruby.social/@lucian/1130784634


Viewing all articles
Browse latest Browse all 596