Remi Gagnon wrote:
Hi,
I have a recursive method and I want to mock a var passed by ref.
Object.should_receive(:my_method).and_return"by_ref"(@value)
Often a way to spec a recursive function is to alias it, and have the
recursive call call the alias. So if you want to check the recursion,
you could do something like this (in a lispy-type ruby):
http://gist.github.com/60491
Scott
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users