How I test Rails applications
Patrik Bóna
424

The system tests as written by DHH is very difficult to read. It is at a very low level (clicking this, filling this out etc). I would rather group some of those call behind a intention revealing method, so it looks like this:

click_on ‘Link a Google Doc’
fill out new google doc form

click_on ‘Post this document’
verify posted document

Validations are tested in Rails, but what will make sure that the attribute specific to your application is validated? Are you going to eye-ball the code every time you checkin to make sure someone did not break it?

Show your support

Clapping shows how much you appreciated BP’s story.