[rspec-users] errors while testing resource controller using rpec

Chris Anderson jchris at mfdz.com
Tue Jan 30 12:24:59 EST 2007


I filed a ticket on this issue the other night. I didn't realize that
to_param ought to return a string, so the bug does seem to be with the
generated specs. But it is interesting to note that the issue does not
affect Rails prior to rev 6062.

I've invalidated my old ticket and submitted a patch that fixes the
issue. Here it is:

http://rubyforge.org/tracker/?func=detail&aid=8316&group_id=797&atid=3151


On 1/30/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 1/30/07, Deepak Jois <deepak.jois at gmail.com> wrote:
> > On 1/30/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > >
> > > Hence you should report this to the rspec tracker:
> > >
> > > http://rspec.rubyforge.org/contribute.html
> > > http://rubyforge.org/mail/?group_id=797
> > >
> > > Cheers,
> > > David
> > >
> >
> > And thus arises my meta-question :).. Since I am quote new to this, I
> > dont know how to submit a patch for this with a spec
> >
> > As far as I can see, it is a VERY trivial patch which involves adding
> > quotes around a number in the generator templates. Should I just go
> > ahead and do that? Or is there a spec that I can actually write for
> > such a trivial patch,
>
> I'll put up better instructions re: patches in the next release of the docs.
>
> In the mean time, since you've diagnosed the problem what you've
> reported above would be just fine. Something along the lines of
> "mocking :to_param should return a Fixnum" as the title and then
> describe the situation. Go ahead and stick that in the Bugs tracker
> (rather than a patch).
>
> Cheers,
> David
>
> >
> > Thanks
> > Deepak
> > _______________________________________________
> > 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
>


-- 
Chris Anderson
http://jchris.mfdz.com


More information about the rspec-users mailing list