mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Upgrade rubocop
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'test_helper'
|
||||
|
||||
class I18nUnitTest < Minitest::Test
|
||||
include Liquid
|
||||
|
||||
def setup
|
||||
@i18n = I18n.new(fixture("en_locale.yml"))
|
||||
@i18n = I18n.new(fixture('en_locale.yml'))
|
||||
end
|
||||
|
||||
def test_simple_translate_string
|
||||
assert_equal "less is more", @i18n.translate("simple")
|
||||
assert_equal 'less is more', @i18n.translate('simple')
|
||||
end
|
||||
|
||||
def test_nested_translate_string
|
||||
assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops")
|
||||
assert_equal "something wasn't right", @i18n.translate('errors.syntax.oops')
|
||||
end
|
||||
|
||||
def test_single_string_interpolation
|
||||
assert_equal "something different", @i18n.translate("whatever", something: "different")
|
||||
assert_equal 'something different', @i18n.translate('whatever', something: 'different')
|
||||
end
|
||||
|
||||
# def test_raises_translation_error_on_undefined_interpolation_key
|
||||
@@ -27,7 +29,7 @@ class I18nUnitTest < Minitest::Test
|
||||
|
||||
def test_raises_unknown_translation
|
||||
assert_raises I18n::TranslationError do
|
||||
@i18n.translate("doesnt_exist")
|
||||
@i18n.translate('doesnt_exist')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user