3 ms·
A thought for you: Testing with respond_to etc. is great. But there's a special place in hell for you if you get people to start testing against specific classe
by vidarh 13y ago
A thought for you: Testing with respond_to etc. is great. But there's a special place in hell for you if you get people to start testing against specific classes.
It's almost always a horrible anti-pattern in Ruby to do "kind_of?" tests or similar, unless you depend on a huge portion of the interface of said class. But almost always code that does tests like that really only depends on a method or two, and doing class based tests makes the code vastly less reusable.
I don't want to dissuade you from this project. There are useful things you can do with contract specifications in Ruby that'd be interesting to explore. But I do hope to dissuade you from having all those class based tests in your tutorial for example...