mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
clean up some rubocop stuff
This commit is contained in:
@@ -151,5 +151,4 @@ class ConditionUnitTest < Minitest::Test
|
||||
Condition.new(left, op, right).evaluate(@context || Liquid::Context.new)
|
||||
end
|
||||
end
|
||||
|
||||
end # ConditionTest
|
||||
|
||||
@@ -462,10 +462,9 @@ class ContextUnitTest < Minitest::Test
|
||||
end
|
||||
|
||||
def test_context_initialization_with_a_proc_in_environment
|
||||
contx = Context.new([:test => ->(c) { c['poutine'] }], { :test => :foo })
|
||||
contx = Context.new([test: ->(c) { c['poutine'] }], { test: :foo })
|
||||
|
||||
assert contx
|
||||
assert_nil contx['poutine']
|
||||
end
|
||||
|
||||
end # ContextTest
|
||||
|
||||
@@ -16,7 +16,7 @@ class I18nUnitTest < Minitest::Test
|
||||
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
|
||||
|
||||
@@ -65,5 +65,4 @@ class StrainerUnitTest < Minitest::Test
|
||||
assert_kind_of b, strainer
|
||||
assert_kind_of Liquid::StandardFilters, strainer
|
||||
end
|
||||
|
||||
end # StrainerTest
|
||||
|
||||
@@ -11,7 +11,7 @@ class TemplateUnitTest < Minitest::Test
|
||||
|
||||
def test_sets_default_localization_in_context_with_quick_initialization
|
||||
t = Template.new
|
||||
t.parse('{%comment%}{%endcomment%}', :locale => I18n.new(fixture("en_locale.yml")))
|
||||
t.parse('{%comment%}{%endcomment%}', locale: I18n.new(fixture("en_locale.yml")))
|
||||
|
||||
locale = t.root.nodelist[0].options[:locale]
|
||||
assert_instance_of I18n, locale
|
||||
|
||||
@@ -71,7 +71,7 @@ class VariableUnitTest < Minitest::Test
|
||||
end
|
||||
|
||||
def test_symbol
|
||||
var = Variable.new("http://disney.com/logo.gif | image: 'med' ", :error_mode => :lax)
|
||||
var = Variable.new("http://disney.com/logo.gif | image: 'med' ", error_mode: :lax)
|
||||
assert_equal VariableLookup.new('http://disney.com/logo.gif'), var.name
|
||||
assert_equal [['image', ['med']]], var.filters
|
||||
end
|
||||
@@ -130,7 +130,7 @@ class VariableUnitTest < Minitest::Test
|
||||
end
|
||||
|
||||
def test_lax_filter_argument_parsing
|
||||
var = Variable.new(%( number_of_comments | pluralize: 'comment': 'comments' ), :error_mode => :lax)
|
||||
var = Variable.new(%( number_of_comments | pluralize: 'comment': 'comments' ), error_mode: :lax)
|
||||
assert_equal VariableLookup.new('number_of_comments'), var.name
|
||||
assert_equal [['pluralize', ['comment', 'comments']]], var.filters
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user