First, Jim Weirich has
posted his slides and Ruby-centric perspective of OSCON.
Well worth checking out.
For today, I’ve taken a look at unit testing in
Ruby. I took a simple task (Atom’s
processing model for content), and
implemented it in Ruby. Unsurprisingly,
REXML
makes it easy.
Even so, test cases are always a good idea. Ruby’s
unit testing support seems to follow in the path pioneered by
JUnit, and emulated by
many others. As is often the case, lines of code in the test
cases in this example outnumber the lines of code in the
implementation.
RDoc can also be used
to produce pretty documentation of the
code and the
tests.
Sam,
Care to speculate on why some moron comment spams you with “Nice blog, commenting is important?” Is there some sort of strange financial incentive I’m not understanding here or is it purely script-kiddie-style annoyance factor at play? Are you finding that these attacks are coming in from U.S. based IPs (as best as you can tell) or is it more international?
Speculation: it was a probe. If the comment shows up in a later search, then the person who left the comment has found a vector for spam.
For the brief period that the comment was here, it has a nofollow attribute, but it is still conceivable that the text was indexed.
Many of these comments seem to be from Russia or Mexico. This one appeared to be from Canada. But I didn’t investigate enough to determine if a proxy was involved.