Skip to content

Fix matching when DidYouMean is enabled#771

Closed
petergoldstein wants to merge 1 commit into
rails:mainfrom
petergoldstein:feature/account_for_did_you_mean
Closed

Fix matching when DidYouMean is enabled#771
petergoldstein wants to merge 1 commit into
rails:mainfrom
petergoldstein:feature/account_for_did_you_mean

Conversation

@petergoldstein

Copy link
Copy Markdown

Because of the changes in Ruby 3.1 to enable DidYouMean for a subset of errors, in a way that is somewhat confusing in specs, rspec-expectations now matches against the original_message, if the Error responds to that method. That avoids having to match the backtrace in these circumstances.

Unfortunately that causes specs like this one - where DidYouMean is being used intentionally - to fail the matcher. This PR updates the spec to avoid use of the matcher.

With this change, specs are now green.

@dorner

dorner commented Jan 24, 2022

Copy link
Copy Markdown

LGTM - @rafaelfranca

@deivid-rodriguez

Copy link
Copy Markdown
Contributor

This one can be closed now because a similar fix was introduced by #780.

This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants