[Rspec-devel] Feature requests

Jim Weirich jim.weirich at gmail.com
Wed Aug 16 01:06:58 EDT 2006


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20060816/09623c48/attachment.html 


More information about the Rspec-devel mailing list