Skip to content

How to specify an "interface"? #24

@XSven

Description

@XSven

Reading this

Test::MockObject allows you to create objects that conform to particular interfaces with very little code.

I am asking myself how can I tell a Test::MockObject instance what is the interface that I am going to mock completely or partially?

To me an interface is a list of method names. To avoid creating a mock that refers to a method that does not belong to a given interface I would like to define my interface first. Test::MockModule provides the strict mode sefety net. Yes I know the scope of Test::MockModule is a given class and not an interface but the problem is the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions