If you’re seeing this in your test:
Expected response to be a <:redirect> , but was <0>
You are probably doing something like this in your controller:
redirect_to :action => 'messages', :status => 'read'
Watch out when using :status in your params. :status is used to set the http status code in the redirect_to method, like so:
redirect_to :action=>'atom', :status=>302
My error was much simpler than this. My editor does auto completion. I typed “p”, hit ESCAPE (for the autocompletion), and got “puts” instead of “put”. So where I wanted:
put :update, :id => some_id, :some_object => { }
I had in my code:
puts :update, :id => some_id, :some_object => { }
“puts” of course returns no redirect.