Another option I use a lot is the spy method (introduced in RSpec 3.1) which means you don’t have to repeat what the name of the method you’re mocking:
clone = spy("clone")
expect(clone).to have_received(:solution)
            Another option I use a lot is the spy method (introduced in RSpec 3.1) which means you don’t have to repeat what the name of the method you’re mocking:
clone = spy("clone")
expect(clone).to have_received(:solution)