On Mon, Mar 3, 2008 at 5:04 AM, Namrata Tiwari <[EMAIL PROTECTED]> wrote:
> Matthias Hennemeyer wrote:
>  > Am 03.03.2008 um 04:38 schrieb Namrata Tiwari:
>  >
>  >> The method find_city is in application controller. I think the method
>  >> 'find_city' is being called but its expecting some args.
>  >>
>  > The message:
>  >
>  > Mock 'ArticlesController' expected :find_city with (any args) once, but
>  > received
>  >   it 0 times
>  >
>  > means that the method find_city was *not*  called.
>  >
>  > If the original method expects args or not doesn't matter.
>  > Because should_receive works as both an expectation and a stub, the
>  > original method will not be called and no ArgumentError will be raised.
>
>  Okaayyy!
>  Then can you also please say why its not calling this :find_city method?

If the code is the same as it was in the first post in this thread,
it's because the action is taking place before setting the
expectations.

>
>  Thx,
>
>
> Namrata.
>  --
>  Posted via http://www.ruby-forum.com/.
>  _______________________________________________
>  rspec-users mailing list
>  rspec-users@rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to