Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic matchers can't be composed #365

Open
jerith opened this issue Feb 9, 2016 · 1 comment
Open

Dynamic matchers can't be composed #365

jerith opened this issue Feb 9, 2016 · 1 comment

Comments

@jerith
Copy link

jerith commented Feb 9, 2016

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.

@rodjek
Copy link
Owner

rodjek commented Oct 2, 2017

@jerith you might be interested in #611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants