Business Value in rSpec Stories
July 9th, 2008
Because rSpec provides a friendly, more readable means of describing use cases/stories, I’ve taken to inserting business value statements directly into the specs. While this could get unwieldy, I think it helps keep stories focused while providing clear context and value to coders.
describe "Filtered fields" do
it "should filter content on save to cache expensive transforms while preserving source" do
# do it
end
end
Doing this in xUnit would probably cause you to have a camel-induced nervous breakdown.
iPhone Unit Testing with Ruby
July 4th, 2008
Well, Dr. Nic is kicking ass again.
Though I’m a recent convert to rSpec for my Merb work, I actually prefer to unit test Objective-C with OCUnit. I think it’s just part of that prejudice that tests should be written in the language of the app. Also, the more ‘natural’ it feels to write tests, the more likely folks will do so. In my experience, a great number of Obj-C developers have no interest in writing tests in the first place…
Still, rbiphonetest seems like a great project and I imagine several of the “pure” Web developers on my team who are itching to get into Objective-C will quite enjoy a familiar testing framework.
Eagerly Awaiting Merb 1.0, DataMapper 1.0
July 2nd, 2008
I’ve been having a blast with Merb and DataMapper lately.
Like everyone else who prefers clean over clever and true pragmatism over dogma, I prefer Merb over some of the other options out there for day to day Web apps.
That said, I’ve not done any major work with the two yet. I have some of my long-shelved personal apps being rewritten/written on Merb master and DataMapper master, but I am kind of holding off on larger commitments until the 1.0 release.
If you haven’t checked out Merb and Datamapper > 0.9 you should.
I’m even coming around on rSpec, though I still prefer xUnit style testing because the language and flow is the same across all the types of development I do (PHP, Ruby, Objective-C, Java).