Just to stay correct: This
Item.should_receive(:random_item).with(:anything, :numeric)
is marked deprecated. It looks like it should be
Item.should_receive(:random_item).with(anything, an_instance_of(Numeric))
Thorben
On Sun, Mar 9, 2008 at 1:33 AM, Thorben Schröder <[EMAIL PROTECTED]> wrote:
Thanks a lot!
Thorben
On Sun, Mar 9, 2008 at 1:22 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote:
> On 3/8/08, Thorben Schröder <[EMAIL PROTECTED]> wrote:
> > Hey,
> >
> > I just ran into a situation where I would like to expect a method call
> > with an argument I know and another one, which
On 3/8/08, Thorben Schröder <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I just ran into a situation where I would like to expect a method call
> with an argument I know and another one, which is a random number.
...
> Which gives me the ability to do the should_receive call like this:
>
> Item.shou
Hey,
I just ran into a situation where I would like to expect a method call
with an argument I know and another one, which is a random number. I
think mocking up the rand method is somehow ugly so I thought maybe
this is the first time where I can take something from Java to Ruby ;)
Java's EasyMoc