You know how tech is. If you don’t stop and look around every, oh, hour or so, a brand new, very interesting technology has surfaced.
If that is not bad enough, old technologies get reinvigorated, like people taking up Vi, Lisp, NeXt… :)
So if you’re like me, are ‘time poor’ and want to get something valuable out of your precious personal-project time, then be brave.
Today I started on a small gem, to help people track what’s taking a lot of time in their Rails boot process. I needed to test. I use RSpec at work, yet I fell back to my default, minitest, because it comes for free with Ruby and is pretty straight forward for small work. I noticed, for the first time, that minitest has a BDD style syntax. Feeling brave, I used it.
I’m glad I did.
It will confuse me when I switch context back to work, then back to the gem. Nevertheless, I enjoyed using something so simple but slightly nicer to type, read and comprehend than:
def test_it_wants_to_have_lots_of_underscores end
You would think that using a bunch of differently named expectations would be annoying. It wasn’t. It stretched my mind in a short amount of time, which is more satisfying than the string of passing tests in my little personal-project.
Got some examples you can share?
January 29, 2013 at 2:41 pm
Unfortunately no. I ran aground with Minitest and switched to RSpec. Unfortunately I don’t immediately recall why. Certainly one take away, Minitest lacked the expressiveness that all the RSpec Matchers provide. I would say, as a whole, I prefer RSpec.
I subsequently started another gem, and part of my scaffolding was RSpec, from the outset.
February 8, 2013 at 6:56 am