RSpec: Stub chains with arguments? December 13, 2023 by Tarik You can use this: Payment.stub_chain(:order, :where).with(:updated_at).with(:paid => true) { return_this }