[rspec-users] .with(:anything) issue
dchelimsky at gmail.com
Thu Nov 13 08:42:44 EST 2008
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?
> When I run my spec, it fails with the following message :
> Spec::Mocks::MockExpectationError in 'MiniGemServer should add a new gem to
> the repository after it has been uploaded'
> #<MiniGemServer::Repository:0xb11164> expected :add_gem with ("test.txt",
> :anything) but received it with ("test.txt",
> Shouldn't it be working? The first argument is the same and I don't really
> care about the second one as long as it is there. I also tried to replace
> :anything with :string and got the same error.
> Any idea why I get this?
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users