I have inherited some intermittently failing tests that create something in the interface, met some issues.
Hello Ruby friends.
I have inherited some intermittently failing tests that create something in the interface, then make some assertions by grabbing the last of these things by created_by from the database. For one reason or another, this sometimes matches up and sometimes doesn’t.
Any thoughts about refactoring these? My instinct is that if it’s creating it in the interface, it should only be asserting things present in the interface rather than reaching into the database... is this a concept with a name?
I have inherited some intermittently failing tests that create something in the interface, then make some assertions by grabbing the last of these things by created_by from the database. For one reason or another, this sometimes matches up and sometimes doesn’t.
Any thoughts about refactoring these? My instinct is that if it’s creating it in the interface, it should only be asserting things present in the interface rather than reaching into the database... is this a concept with a name?
No any search results
You already invited:
2 Answers
Amos
Upvotes from:
dennis
Upvotes from:
In the sense that the default rails testing folders give you a folder called integration, and the way it’s used doesn’t seem to be the same way other languages use the terminology.
However, it does seem to be pretty common to have a test like this that seems to want to ensure the POST web interface, actually persists items in the database