System Tests and Others
Explore the use of Minitest::TestCase subclasses to write system and integration tests in Rails applications. Understand how to configure JavaScript tests using Capybara with headless Chrome and learn why Rails recommends specific test types for different scenarios. This lesson empowers you to execute and optimize your test suite effectively within the Rails framework.
We'll cover the following...
We'll cover the following...
In addition to ActiveSupport::TestCase, Rails provides some other subclasses of Minitest::TestCase that provide custom functionality. In most of these cases, the RSpec functionality we’ve already seen is built on top of these classes:
- The
ActionDispatch::SystemTestCase: The parent class for system tests, which we saw in the chapter “Integration Testing with Capybara and Cucumber".