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 => databases(:one).id, :format => 'json'
response.should render_template('show')

but I keep getting a nil template.

I know this works in the code, when I try a URI like
http://localhost:3000/foo.json

Any tips for setting the format or MIME Type correctly so I can
activate other respond_to blocks?

Thanks very much,
Seth
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to