I have a simple method to test my index
action in one of my Rails controllers. In minitest, it sends a request to GET /{resource}
like get :index, format: :json
.
In my controller action for index
I have a few lines that puts some_var
. How can I view this output from the controller action when running the test from the command line?
It is output when sending a request to the server, but doesn't appear when running the test from the command line.