mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 02:10:41 -07:00
Upgrade rubocop
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'test_helper'
|
||||
|
||||
class CaptureTest < Minitest::Test
|
||||
include Liquid
|
||||
|
||||
def test_captures_block_content_in_variable
|
||||
assert_template_result("test string", "{% capture 'var' %}test string{% endcapture %}{{var}}", {})
|
||||
assert_template_result('test string', "{% capture 'var' %}test string{% endcapture %}{{var}}", {})
|
||||
end
|
||||
|
||||
def test_capture_with_hyphen_in_variable_name
|
||||
@@ -14,7 +16,7 @@ class CaptureTest < Minitest::Test
|
||||
END_TEMPLATE
|
||||
template = Template.parse(template_source)
|
||||
rendered = template.render!
|
||||
assert_equal "Print this-thing", rendered.strip
|
||||
assert_equal 'Print this-thing', rendered.strip
|
||||
end
|
||||
|
||||
def test_capture_to_variable_from_outer_scope_if_existing
|
||||
@@ -30,7 +32,7 @@ class CaptureTest < Minitest::Test
|
||||
END_TEMPLATE
|
||||
template = Template.parse(template_source)
|
||||
rendered = template.render!
|
||||
assert_equal "test-string", rendered.gsub(/\s/, '')
|
||||
assert_equal 'test-string', rendered.gsub(/\s/, '')
|
||||
end
|
||||
|
||||
def test_assigning_from_capture
|
||||
@@ -45,6 +47,6 @@ class CaptureTest < Minitest::Test
|
||||
END_TEMPLATE
|
||||
template = Template.parse(template_source)
|
||||
rendered = template.render!
|
||||
assert_equal "3-3", rendered.gsub(/\s/, '')
|
||||
assert_equal '3-3', rendered.gsub(/\s/, '')
|
||||
end
|
||||
end # CaptureTest
|
||||
|
||||
Reference in New Issue
Block a user