[Rspec-devel] Feature requests

Brian Takita brian.takita at gmail.com
Wed Aug 16 01:25:12 EDT 2006


>
> .and_return(1,2,3)    -- Returns three times, first a 1, then a 2, then a
> 3


Yes, I like that.

On 8/15/06, Jim Weirich <jim.weirich at gmail.com> wrote:
>
> On 8/15/06, Judson Lester <nyarly-rspec at redfivellc.com> wrote:
>
> > It wouldn't hurt if mocks passed .and_return([1,2,3]) would treat that
> > as an expectation to be called at least 3 times, and warn if they were
> > told otherwise -
>
>
>
> Hmmm ... how would one specify that it returned an array consisting of the
> numbers 1, 2 and 3?
>
> Perhaps this convention would work:
>
> .and_return([1,2,3])  -- Returns once, the array [1,2,3]
> .and_return(1,2,3)    -- Returns three times, first a 1, then a 2, then a
> 3
>
> --
> --
> -- Jim Weirich     jim at weirichhouse.org     http://onestepback.org
> -----------------------------------------------------------------
> "Beware of bugs in the above code; I have only proved it correct,
> not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
>
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20060815/cd91a291/attachment-0001.html 


More information about the Rspec-devel mailing list