Closed jackturnbull closed 5 years ago
Thanks! Looks like Timecop needs a fix, I will try to fix it this weekend or remove it
Moved to the crystal-community maintained package, and now using blocks.
It appears that Spec.before_each is a globally scoped call and the load order of files will determine which one is used. Moved to providing a time freeze within a block, and this is recommended by Timecop's safe mode.
I don't love having to wrap each spec in a block largely because of more test scaffolding in every test, honestly, but I don't feel like there's many good alternatives given the Spec.before_each global issue.
edit: also big big well done for having tests for the encoding of restricted characters. I'd have missed that if not, and again for spaces.
I appear to still be getting;
Which I tracked down to be from the changed file in this PR. I believe encode is the right method here, as per crystal-lang/crystal#7997.