I want to discover with BDD missing :include params for ActiveRecord::Base.find method. So my idea is to have in spec something like this:
ActiveRecord::Base
I think I had the same problem here. In your particular case I would do this which I find quite clean.
original_method = ActiveRecord::Base.method(:find)
ActiveRecord::Base.should_receive(:find).once do (*args)
original_method.call(*args)
end
I believe you could extend the Rspec Mocks::MessageExpectation
class to include the and_proxy_to_original_method
method, shouldn't be too hard, but I haven't looked.