Allow inheriting mocks matchers
Created by: nepalez
With reference to #1055 (closed)
Allows rspec matchers inherited from RSpec::Mocks::Matchers::*
to be used
both in mocks and expectations:
class ReceiveFoo < RSpec::Mocks::Matchers::Receive
def initialize
super :foo, nil
end
end
describe "receiving foo" do
it "works" do
object = double
allow(object).to receive_foo
expect(object).to receive_foo
object.foo
end
end