I was wondering if this is a bug or perhaps an issue with how I'm using filters.
When a filter chain halts, nothing is sent back to the browser by default.
During tests, if a filter chain halts, the following error occurs because the response has no body.
NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.split actionpack/lib/action_controller/integration.rb:291:in `parse_result' actionpack/lib/action_controller/integration.rb:271:in `process' actionpack/lib/action_controller/integration.rb:152:in `get' actionpack/lib/action_controller/integration.rb:498:in `get'
Now I can add something like render(:nothing => true, :status => 401) to my filters if they fail, but that makes things look a bit messy.
Is this a bug in the integration code? Or am I doing something wrong?
Thanks, Andrew