-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix frozen string in validatable, use multiline string instead.
Expand tests to check for the actual validatable exception message This was raising a `FrozenError` on Ruby < 3 where interpolated strings were considered frozen. This [changed in Ruby 3], since such strings are dynamic there's no point in freezing them by default. The test wasn't catching this because `FrozenError` actually inherits from `RuntimeError`: >> FrozenError.ancestors => [FrozenError, RuntimeError, StandardError, Exception, Object ...] So the exception check passed. Now we're also checking for the error message to ensure it raised the exception we really expected there. Closes #5465 [changed in Ruby 3] https://bugs.ruby-lang.org/issues/17104
- Loading branch information
1 parent
41e2db2
commit 4146085
Showing
3 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters