Hello,
I'm having a hard time testing my controllers that use respond_to.
I'm trying to test that I can correctly handle each MIME type on
request.
For instance, I have this:
respond_to do |format|
format.html
format.json
end
And I've tried things like this:
get 'show', :id
est.
Is there a better way to write a spec to ensure that the correct
template is rendered when I use certain formats?
Seth
On Mon, Mar 24, 2008 at 8:35 PM, Seth Ladd <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm having a hard time testing my controllers that use respond_to.
>
> There is a guideline in TDD that you should test your code and not
> other people's code. The behaviour you're interested in testing is
> that of ActionController::Base, not of your code.
I, of course, do not want to test Rails. I do, however, want to
ensure that I have a block to handle the