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 is a random number.
>  >  ...
>  >
>  >
>  >  >  Which gives me the ability to do the should_receive call like this:
>  >  >
>  >  >   Item.should_receive(:random_item).with(any_object,
>  >  >  any_number).at_least(1).times.and_return(mock_model(Item))
>  >
>  >
>  > >   My question is: Is this too much effort? Is something like
>  >  >  this already built into RSpec,
>  >
>  >  Item.should_receive(:random_item).with(:anything, :numeric)
>  >
>  >  --
>  >  Rick DeNatale
>  >
>  >  My blog on Ruby
>  >  http://talklikeaduck.denhaven2.com/
>  >  _______________________________________________
>  >  rspec-users mailing list
>  >  rspec-users@rubyforge.org
>  >  http://rubyforge.org/mailman/listinfo/rspec-users
>  >
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to