[rspec-users] .with(:anything) issue

David Chelimsky dchelimsky at gmail.com
Thu Nov 13 08:45:24 EST 2008


On Thu, Nov 13, 2008 at 7:44 AM, Matt Wynne <matt at mattwynne.net> wrote:
> On 13 Nov 2008, at 13:42, David Chelimsky wrote:
>>
>> On Thu, Nov 13, 2008 at 7:38 AM, Emmanuel Pirsch <emmanuel at pirsch.org>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm using a expectation like this :
>>> repository.should_receive(:add_gem).with("test.txt", :anything)
>>
>> Try the anything() method. Support for symbols as argument matchers
>> was deprecated and removed.
>>
>> Are you still seeing docs somewhere that talk about using symbols?
>
> I know I always go on about this (and never do anything about it) but the
> symbols are still all over the docs:
> http://rspec.info/documentation/mocks/message_expectations.html
>
>> Argument Constraints
>>
>> Constraints can be placed on individual arguments which are looser than
>> value
>> equivalence (as above).
>> :anything
>>
>> accepts any value for this argument, e.g.:
>>
>> my_mock.should_receive(:msg).with(1, :anything, "A")

carapola!

There is just no time for the present.

Update coming shortly.

>
> cheers,
> Matt
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list