context "Blog post" do
specify "should be fun to read" do
words.size.should_be < 500
images.should_not_be_empty
reader.should_respond_to :post
end
end
I just started using RSpec, and loving every minute of it.
The first few test cases felt a bit weird. Badly written English in the passive voice: this.should_be_that. Enough shoulds to drive any English major nuts.
But I like the fact that my test cases look the opposite of my code. And somehow, they end up shorter and more fun to write than assertions. I can’t explain why, I just know with test cases, every bit of motivation helps.
This one is a keeper.
Chipping the web – something smells — Chip’s Quips