We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class Token def initialize(token) = @token = token def match?(other) = other == @token end
expect(Token.new('FOO')).to be_match('FOO') # calls Token.new('FOO').match?('FOO') => true
expect(Token.new('FOO')).to match('FOO') # calls 'FOO'.match(Token.new('FOO')) => false
fails with message:
expected #<Token:0x**** @token="FOO"> to match "FOO"
The text was updated successfully, but these errors were encountered:
Is it deliberate that you don’t want to override == in this class?
==
Sorry, something went wrong.
No branches or pull requests
Example
Passed expectation
Autocorrected expectation
fails with message:
The text was updated successfully, but these errors were encountered: