Embeddable tests
Why not embed unit tests right into the code?
There, want to know whether a class passes its specs? Just run Foo.valid?
.
This isn’t very convenient if you think of the use cases for this, but the idea itself is fun. :)
Why not embed unit tests right into the code?
There, want to know whether a class passes its specs? Just run Foo.valid?
.
This isn’t very convenient if you think of the use cases for this, but the idea itself is fun. :)