[rspec-users] .with(:anything) issue
matt at mattwynne.net
Thu Nov 13 08:44:26 EST 2008
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:
>> 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:
> Argument Constraints
> Constraints can be placed on individual arguments which are looser
> than value
> equivalence (as above).
> accepts any value for this argument, e.g.:
> my_mock.should_receive(:msg).with(1, :anything, "A")
More information about the rspec-users