DEV Community

Discussion on: Go already has RSpec!

Collapse
 
rhymes profile image
rhymes

I'm conflicted on the table driven approach as well. But I think that for testing "error cases" is the best. You just list them all and done. Also it saves a lot of code duplication.

I tend not to use the test tables for the "ok" response, so that I can dig into the response and check everything's how it's supposed to be.

Collapse
 
alirezabashiri profile image
Alireza Bashiri

I think there's a conflict in Go community too when it comes to writing a program, duplication becomes a second-citizen but in testing duplication not tolerated.