I created a small rails app using StimulusReflex and testing it with Rails' standard minitest framework.
I want to write a "controller" test that invokes a reflex and tests the controller response, but that seems to be impossible. Any hint on how to do this?
There is a Gem you can add to help you with reflex testing
stimulus_reflex_testing
: https://github.com/podia/stimulus_reflex_testingThen you will be able to have test such as this:
The gem also includes some spec matchers. But people in the SR community mostly use system tests.