[Rspec-devel] Feature requests

aslak hellesoy aslak.hellesoy at gmail.com
Wed Aug 16 01:33:06 EDT 2006


On 8/16/06, Brian Takita <brian.takita at gmail.com> wrote:
>
> > .and_return(1,2,3)    -- Returns three times, first a 1, then a 2, then a
> 3
>
>
> Yes, I like that.
>

Please register an RFE. I'd do it myself, but I'm in the midst of moving....

A

>
> 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
>
>
>
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>
>


More information about the Rspec-devel mailing list