Use :rack_test for Non-JavaScript User Flows

Learn about the usage of :rack_test for user flows that do not involve JavaScript.

We'll cover the following

The :rack_test driver

Because we’re only using JavaScript where we need it, and because we are favoring Rails’ server-rendered views, most of our features should work without requiring JavascriptThis doesn’t mean there isn’t any JavaScript for these features, just that the features can be exercised without JavaScript executing at all.. One of the benefits to this approach is that we can test these features without using a real web browser.

Rails system tests use Chrome by default. We’ll set that up later, but for now, let’s codify our architectural decisions around server-rendered views by making the default test driver for system tests the :rack_test driver. We can do this in test/application_system_test_case.rb.

Get hands-on with 1200+ tech skills courses.