liquid
liquid copied to clipboard
Fixes #1156 Liquid::Utils has no tests
Fixes #1156
Added tests to Liquid::Utils, tried to understand the context and constraints of each one of the methods based on the use cases.
Didn't add a test for #slice_collection
as it seems to be a workaround created for ForTagTest
.
I've also added a skip
for test_to_date_with_string
as it seems like minitest is failing to stub the timezone offset, I'm investigating it further on minitest.
CLA done
@shopmike What's your opinion on adding https://github.com/travisjeffery/timecop to the test dependencies? I'm struggling to test time methods that depend on current time/zone and timecop
would make it easier.
Yeah, I think it is worth trying and seeing what it looks like. Just make sure it's only loaded for tests, so it can't impact Liquid users.