I\'m using the RSpec gem.
In my controller, I have a before action
before_action :require_user, except: %i[show index]
require_user