Skip to content

Commit

Permalink
Fix actionview test to work regardless of capitalization of missing t…
Browse files Browse the repository at this point in the history
…ranslation message
  • Loading branch information
guilleiguaran authored and zzak committed Jun 7, 2023
1 parent b1abacd commit 25e94f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionview/test/template/translation_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def test_raises_missing_translation_message_with_raise_config_option
def test_raise_arg_overrides_raise_config_option
ActionView::Helpers::TranslationHelper.raise_on_missing_translations = true

expected = "translation missing: en.translations.missing"
assert_equal expected, translate(:"translations.missing", raise: false)
expected = /translation missing: en.translations.missing/i
assert_match expected, translate(:"translations.missing", raise: false)
ensure
ActionView::Helpers::TranslationHelper.raise_on_missing_translations = false
end
Expand Down

0 comments on commit 25e94f4

Please sign in to comment.