liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Fixes #1156 Liquid::Utils has no tests

Open alebruck opened this issue 5 years ago • 3 comments

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.

alebruck avatar Oct 08 '19 22:10 alebruck

CLA done

alebruck avatar Oct 08 '19 22:10 alebruck

@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 timecopwould make it easier.

alebruck avatar Oct 21 '19 14:10 alebruck

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.

shopmike avatar Oct 21 '19 19:10 shopmike