What is Rails testing (RSpec vs Minitest)?

Answer

Rails ships with Minitest as the default testing framework, offering unit tests, functional tests, integration tests, and system tests. It uses a simple assertion-based API. RSpec is a popular alternative BDD framework with a more expressive DSL (describe, context, it, expect, should matchers). The Rails testing stack includes: FactoryBot (fixtures alternative for creating test data), Faker (fake data generation), Shoulda-Matchers (model validation matchers for RSpec), and Capybara (browser simulation for integration/system tests).