I Need to be More Positive or Hooray Shoulda
July 26th, 2008
I really don’t mean for this blog to devolve into Ruby’s BileBlog. The problem is, more talented bloggers than I seem to have the positive aspects of the Ruby community very well covered and I really don’t want to simply retread well-trodden ground. With that said, there are a few things that I feel like aren’t being shouted from the rooftops the way they should be. Here’s one of them…
Simplicity Rules, Hooray Shoulda
In my opinion, RSpec represents a huge improvement over Test::Unit. I have a thing for aesthetically pleasing code and RSpec’s DSL satisfies me.
Not all is well in RSpec land though. RSpec is a very complicated piece of code and we’ve experienced some very difficult to debug issues with it. For all it’s ugliness, Test::Unit works.
This is where Shoulda comes in. With a relatively small and simple code-base we’re getting syntactic sugar on top of Test::Unit that provides most of the beauty of RSpec.
More importantly, we get an extensive set of Rails specific macros which makes building specs for a Rails app far simpler. Most every Rails macro has a corresponding Shoulda macro.
Very DRY with a clean, easy to understand code-base. I love it. Also, this revelation of mine is a long time coming, many thanks to Bryan Liles and Steven Bristol for putting me in line.
I haven’t had a chance to use it in a project just yet but, I’ve done a lot of testing and research and am really looking forward to my future with Shoulda.
Sorry, comments are closed for this article.