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

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

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