I finally learnt to write Cucumber tests

I finally learnt to write Cucumber tests, although I’m limited to writing cucumber tests only for rails apps. I still have a long way to go. But forcing myself to write tests for my next rails app has done me good. I’ve only written one feature with 2 scenarios and made it pass. But that wasn’t using authentication. So will have to tinker with Devise auth gem and write tests with it. I’m going to move on writing complex tests for my app and start coding it only when I finish the tests.

Given I’m on the veggies list
And I press “Create New Veggie”
Then I should see “New Veggie”

After all the shopping… The RSpec book, Using Cucumber screencast from peepcode, Rails Test Prescriptions and lot of videos, it was the 15min railscasts episode that taught. As you can see I’ve tried numerous resources, but none of them seem to have the right way of teaching testing to newbies. I finally understood the rails casts when I tried an example similar to the one in the episode. Seems like TDD requires the missing manual.

P.S: I’ve put up a resources page on my site. This is where I’ll jot down all links I think are more precious than others.

 

Posted