diff --git a/changelog/fix_prevent_breaking_change_for_assertion_message_in_test.md b/changelog/fix_prevent_breaking_change_for_assertion_message_in_test.md new file mode 100644 index 00000000..84e3e52e --- /dev/null +++ b/changelog/fix_prevent_breaking_change_for_assertion_message_in_test.md @@ -0,0 +1 @@ +* [#247](https://github.com/rubocop/rubocop-minitest/pull/247): Prevent breaking change for assertion message in test. ([@koic][]) diff --git a/lib/rubocop/minitest/assert_offense.rb b/lib/rubocop/minitest/assert_offense.rb index f62f13dc..fd17cfc3 100644 --- a/lib/rubocop/minitest/assert_offense.rb +++ b/lib/rubocop/minitest/assert_offense.rb @@ -79,7 +79,7 @@ def setup cop_name = self.class.to_s.delete_suffix('Test') return unless RuboCop::Cop::Minitest.const_defined?(cop_name) - @cop = RuboCop::Cop::Minitest.const_get(cop_name).new + @cop = RuboCop::Cop::Minitest.const_get(cop_name).new(configuration) end def format_offense(source, **replacements)