[rspec-users] errors while testing resource controller using rpec
dchelimsky at gmail.com
Tue Jan 30 06:04:35 EST 2007
On 1/30/07, Deepak Jois <deepak.jois at gmail.com> wrote:
> On 1/30/07, Deepak Jois <deepak.jois at gmail.com> wrote:
> > however, If I change the mock stub to return a string, the spec passes fine.
> > @mock_venue.stub!(:to_param).and_return("1") # note the string
> > There is something happening in the generated code venue_url which I
> > am not aware of, which is causing the test to fail on the mock object.
> According to http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001033
> the to_param method sends a stringified ID. Hence this should be a bug.
Hence you should report this to the rspec tracker:
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users