[rspec-users] Testing Controllers with respond_to?

2008-03-24 Thread Seth Ladd
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

Re: [rspec-users] Testing Controllers with respond_to?

2008-03-25 Thread Seth Ladd
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. >

Re: [rspec-users] Testing Controllers with respond_to?

2008-03-25 Thread Seth Ladd
> 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