Matchers missing compound methods
Created by: eLod
Subject of the issue
I was trying to use rspec expectations' compound feature as in expect().to have_received().and.have_received()
(actually for using with .ordered
), but the and
method is missing from HaveReceived
matcher (and i guess from the others too). Including RSpec::Matchers::Composable
into the matcher solves the problem (though the error may be somewhat misleading, as for example if the argument expectations fail it still complains about calls out of order).
Your environment
- Ruby version: 2.6.4
- rspec-mocks version: 3.8.1
Steps to reproduce
Try to chain compound methods onto have_received matcher.
Expected behavior
Should work.
Actual behavior
It raises NoMethodError.