Inertia Rails Testing

Testing Inertia Rails responses with RSpec and Minitest: component assertions, prop matching, flash verification, deferred props, and partial reload helpers. Use when writing controller specs, request specs, or integration tests for Inertia pages. ALWAYS use matchers (render_component, have_props, have_flash), NOT direct access (inertia.component, inertia.props). CRITICAL: after POST/PATCH/DELETE with redirect, MUST call follow_redirect! before asserting flash or props — without it you're asserting against the 302, not the Inertia page. Setup: require 'inertia_rails/rspec'.

inertia-rails Updated

File contents

inertia-rails/skills/tree/main/skills/inertia-rails-testing commit 58bf1ba52f

Frequently asked questions

npx skillmds@latest add inertia-rails/inertia-rails-testing