ruby - Rails - is writing tests for testing CRUD operations worth it, if so integration or unit? -



ruby - Rails - is writing tests for testing CRUD operations worth it, if so integration or unit? -

i have lengthy simple form allows users update products, nil fancy, displays fields come in text values & updates corresponding database table.

is regular practice write tests crud operations such this? of import form works used everyday - there not much go wrong. have time this, don't want wasting time either or create future maintenance of test suite overly difficult.

if cover tests, should utilize integration (cucumber) or unit (rspec) tests?

thanks advice!

in theory believe supposed utilize both: rspec test each layer in isolation, cucumber test whole stack. if think piece of app straight-forward warrent slavish adherence principles, recommend stick integration tests. it's of import know if isn't working right, , imo cucumber lone should suffient purpose.

of course of study more complex areas of app, want utilize mixture of each.

ruby cucumber

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -