[rspec-users] should_receive with block or proc?

2012-08-04 Thread Alexander Baronec
Hello. How can I test object to receive message and compare arguments of this message with value evaluated at present time? It is possible? For example: should_receive(:api_send).with( -> { players.count } ) And players.count will be called and evaluated only when api_send is received. __

Re: [rspec-users] should_receive with block or proc?

2012-08-06 Thread Alexander Baronec
It don't work when object received few messages. I described it there: http://stackoverflow.com/questions/11669979/should-recieve-alongside-other-messages 2012/8/5 David Chelimsky > On Sat, Aug 4, 2012 at 1:46 PM, Alexander Baronec > wrote: > > Hello. > > How can I

Re: [rspec-users] should_receive with block or proc?

2012-08-06 Thread Alexander Baronec
I wan't to test order of received messages. I want to test only one message of few and compare it with real-time value. It's not possible? 2012/8/6 David Chelimsky > On Mon, Aug 6, 2012 at 3:48 AM, Alexander Baronec > wrote: > > 2012/8/5 David Chelimsky > >> &

[rspec-users] Fuzzy should_receive matching

2013-05-30 Thread Alexander Baronec
Hello. I have a test problem when I should test arguments in method not by exact matching buy with fuzzy matching. For example I have this test: require 'rspec' describe do it do o = Object.new o.should_receive(:api_send).with mode: :say o.api_send mode: :say, time: Time.now + ran

Re: [rspec-users] Fuzzy should_receive matching

2013-06-05 Thread Alexander Baronec
Thx. It's exactly what I searched. On Thu, May 30, 2013 at 4:11 PM, David Chelimsky wrote: > On Thu, May 30, 2013 at 2:44 AM, Alexander Baronec wrote: > >> Hello. >> I have a test problem when I should test arguments in method not by exact >> matching buy with fuzz