With RSpec and most other things in life, a little time goes a long way.

Back at the beginning of 2012, we did all of our testing at Treehouse with MiniTest. A good bit of that was probably my fault, as I was a staunch defender of it as a testing framework. I loved MiniTest because:

  • It came with Ruby.
  • It was lightweight.
  • It met my needs.
  • It wasn’t cool.
  • It didn’t add extra test methods to every object.

As we started to grow our development team, the discussion of why we weren’t using RSpec came up pretty often. I’d usually refer to the list above, and folks would kind of shrug and move on, but basically every time a new developer joined the team we had this discussion.

Finally, someone raised that we should just add a spec folder and test RSpec out for a bit. By that point the new expect syntax had been released, so adding test methods to every object wasn’t a valid argument. My other arguments weren’t very valid anyway, so we added a spec folder and started testing out RSpec.

At first I was pretty grumpy about the whole thing. I dug my heels in and continued to use MiniTest, but as everyone around me started to proclaim their love for RSpec, I realized I had to give it a try. Within about a week I loved it too. The tests were easier to read, the output was friendlier, and digging under the hood showed me it was an easier framework to extend.

I haven’t turned back since. All my new projects use RSpec. It has made me like testing even more, and it has made me a more efficient programmer.

Without our team basically forcing me to try RSpec out I wouldn’t only be a lot less effective programmer. I would have been guilty of holding our team back.

I’m glad I gave it a week.

Thanks to Olivier Lacan for his feedback on this post.