Skip to content

Dynamic matchers can't be composed #365

Open
@jerith

Description

@jerith

The various dynamic matchers (contain_class, etc.) can't be composed or easily used in custom matchers. The problem is that rspec's values_match? method uses expected === actual to test for a match and the dynamic matchers don't implement #===.

A possible solution is to add a #=== method (or alias) to each of the CreateGeneric classes that delegates to #matches? so that values_match? checks for a match instead of object equality.

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