Skip to content

FR: expect_inherits()Β #2016

@t-kalinowski

Description

@t-kalinowski

Now that base::inherits() can accept any object in the what argument, and S7 encourages using reified class objects instead of class names as character vectors, it might be useful to add an expect_inherits() function. This function would generally behave like expect_s3_class() but could dispatch nameOfClass() on the second argument when needed.

For example, it could replace tests like those seen here: cole-brokamp/fr#15

Possibly related issue: #1448

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions