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

Reply via email to