describe "as a Proc" do
before :each do
@ids = [1,2,3]
@proc = Proc.new { |records| records.reverse }
end
it "the proc should reverse the list" do
mock.proxy(@proxy).call(@ids)
@proc.call(@ids).should == @ids.reverse
end
end
Is failing with:
1) AridCache::CacheProxy::ResultProcessor proxies as a Proc the proc should reverse the list
Failure/Error: mock.proxy(@proxy).call(@ids)
RR::Errors::TimesCalledError:
call([1, 2, 3])
Called 0 times.
Expected 1 times.
# ./spec/arid_cache/cache_proxy/result_processor_spec.rb:287
@kjvarga There's a typo in the line mock.proxy(@proxy).call(@ids): @proxy instead of @proc. And this snippet works for me: https://gist.github.com/3835159
The following spec:
Is failing with:
It's not recognizing the call to
call()