|
|
|
|
|
by PLejeck
4624 days ago
|
|
I know there's not a right way, but I still can't even figure out the most basic of tests. The guys in #rails tell me to stub this, mock that, but then they never explain the terms or how to even stub Rails features. I get what I need to do, but I'm not sure how to do it. |
|
In general, you want to write the smallest test that will work. Unit tests are always better (and you dont need to stub anything or mock anything if you're lucky).
Note that your problem might be your software. If you write relatively decouples and composible code, testing it should be easy (and you can go a long time without mocking anything). So if you're using fat models for example, that's very easy to test.