Testing What Users Can’t See
Explore the role of request tests in Ruby on Rails, focusing on testing backend behavior invisible to users. Understand how to write request tests to verify data changes and improve test suite speed compared to feature tests.
We'll cover the following...
We'll cover the following...
Setting up the test
Request tests are similar to feature tests in that they exist to test things in integration, but they differ from feature tests in their focus. They’re mostly concerned with what the user can’t see.
Note: There is an exception to this rule. If you have many feature tests that are testing variations of the same thing, you might want to move them to the request layer because they will run faster. You don’t have to, but it ...