[rspec-users] problems testing a rails controller
Jay Donnell
jaydonnell at yahoo.com
Thu Jan 18 20:48:04 EST 2007
I'll try it without render :action as soon as I get a
chance. I don't know why that would be a problem
though.
--- David Chelimsky <dchelimsky at gmail.com> wrote:
> On 1/18/07, Jay Donnell <jaydonnell at yahoo.com>
> wrote:
> > "Mmm... You're posting to the action 'search.rjs',
> but
> > what you want to
> > test is the action 'search'"
> >
> > My understanding is that the new restful stuff in
> edge
> > rails (i.e. the respond_to) method will use the
> > extension to determine which output type to use.
> This
> > code runs fine outside of the tests and I am using
> > urls with extensions.
> >
> > What is the usual way to test various respond_to
> > output types from rspec?
>
> This bit looks odd:
>
> respond_to do |format|
> format.js { render :action => "search.rjs" }
> end
>
> I think you'd want to either render :template =>
> 'seach.rjs' or just
> say format.js (and the rjs template would be
> rendered implicitly, no?)
>
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Do you Yahoo!?
> > Everyone is raving about the all-new Yahoo! Mail
> beta.
> > http://new.mail.yahoo.com
> > _______________________________________________
> > 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
>
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
More information about the rspec-users
mailing list