[rspec-users] Speccing the format portion of a controller

doug livesey biot023 at gmail.com
Sat Feb 7 11:00:02 EST 2009


Cheers for that -- that's what I thought was the hacky solution! ;)I'm now
reassured that I'm not being evil -- thanks!
   Doug.

2009/2/7 David Chelimsky <dchelimsky at gmail.com>

> On Sat, Feb 7, 2009 at 5:16 AM, doug livesey <biot023 at gmail.com> wrote:
> > Hi -- I have a hacky work-around for this, but wondered if anyone could
> tell
> > me the canonical way of sending the get/put/etc. portion of a spec with
> > format information.
>
> This is what is in the specs generated by rspec-rails:
>
>  request.env["HTTP_ACCEPT"] = "application/xml"
>  get :index
>
> HTH,
> David
>
> > I guess with something that might look like this:
> > def do_get
> >   get :index, :format => :xml
> > end
> > Cheers,
> >    Doug.
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090207/19d4cd84/attachment-0001.html>


More information about the rspec-users mailing list