mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
* Enabled frozen string literals * Update rubocop config * Prefer string interpolation in simple cases Co-Authored-By: Dylan Thacker-Smith <dylan.smith@shopify.com>
26 lines
493 B
Ruby
26 lines
493 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'test_helper'
|
|
|
|
class HashOrderingTest < Minitest::Test
|
|
module MoneyFilter
|
|
def money(input)
|
|
format(' %d$ ', input)
|
|
end
|
|
end
|
|
|
|
module CanadianMoneyFilter
|
|
def money(input)
|
|
format(' %d$ CAD ', input)
|
|
end
|
|
end
|
|
|
|
include Liquid
|
|
|
|
def test_global_register_order
|
|
with_global_filter(MoneyFilter, CanadianMoneyFilter) do
|
|
assert_equal " 1000$ CAD ", Template.parse("{{1000 | money}}").render(nil, nil)
|
|
end
|
|
end
|
|
end
|