[Rspec-devel] Feature requests

aslak hellesoy aslak.hellesoy at gmail.com
Sun Aug 20 22:18:48 EDT 2006


On 8/16/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
>

I've created a patch for this:
http://rubyforge.org/tracker/index.php?func=detail&aid=5435&group_id=797&atid=3152

David - you're the boss. Ok to commit this? It will break backwards
compatibility, but I think that's ok if we explain in the release
notes what needs to be changed. We're only 0.6 (We should bump to 0.7
if this goes in).

Aslak

> --
> --
> -- 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
>
>


More information about the Rspec-devel mailing list