On 13 Nov 2008, at 13:42, David Chelimsky wrote:
On Thu, Nov 13, 2008 at 7:38 AM, Emmanuel Pirsch
<[EMAIL PROTECTED]> 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")
cheers,
Matt
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users