Tests Scopes
When we're testing an Rails app, there a few scopes that we can test. Inside the app I'm developing, I made a few decisions to let clear each scope is responsible to test what.
- Models Specs: resposible to test validation, callbacks and logic inside of models;
- Controller Specs: responsible to test assigments, redirects and flash messages
- View specs: responsibles to check if views are made inside the server as expected;
- Requests Specs: check if routes have the correct HTTP response.
- Feature Specs: check if the page behaviour correctly with user interaction. Can test multiple pages.