mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
Ruby compatibility issues
- regexp engines are different from 1.8 to 1.9, fixed the literal shorthand regexp accordingly - changed the shorthand regexp text from a match to a string scan - test_helper now loads rubygems unless RUBY_VERSION is > 1.9
This commit is contained in:
@@ -43,6 +43,7 @@ class RegexpTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_literal_shorthand_regexp
|
||||
assert_match "{{{ {% if 'gnomeslab' contains 'liquid' %}yes{% endif %} }}}", LiteralShorthand
|
||||
assert_equal [["{% if 'gnomeslab' contains 'liquid' %}yes{% endif %}"]],
|
||||
"{{{ {% if 'gnomeslab' contains 'liquid' %}yes{% endif %} }}}".scan(LiteralShorthand)
|
||||
end
|
||||
end # RegexpTest
|
||||
|
||||
Reference in New Issue
Block a user