rspec/rules/S2302/description.adoc

5 lines
322 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
Because parameter names could be changed during refactoring, they should not be spelled out literally in strings. Instead, use ``++nameof()++``, and the string that's output will always be correct.
2020-06-30 12:48:07 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
This rule raises an issue when a string in the ``++throw++`` statement contains the name of one of the method parameters.