renatoathaydes / spock-reports

This project creates a global extension to Spock to create test reports.
Apache License 2.0
273 stars 68 forks source link

Fixed failing unittest caused by Default-Locale #211

Closed ziffit closed 2 years ago

ziffit commented 3 years ago

Test was always failing, as my Default-Locale (de_DE) produced a different html-String. This is caused by the StringFormatHelper using String.format().

To fix the Test, the Default-Locale is set to en_US.

Just because I am curious, I also tried 'sv_SE' as Locale. But the Test was still failing. What locale are you using? ;-)

renatoathaydes commented 3 years ago

The tests pass in the GitHub Actions as is... with your changes, it does not : https://github.com/renatoathaydes/spock-reports/runs/2413846771

Would be nice to make the tests Locale-independent though.

ziffit commented 3 years ago

Yes, it is strange. "Worked on my machine" :-P But the problem with the failing Tests, is now the number of digits after the delimiter symbol. Not the symbol itself (as it was before). I'll try to dig deeper. And fix my fix ;-) Sorry for the failing Pull-Request.

renatoathaydes commented 2 years ago

If you ever get back to this, let me know and we re-open the PR!