A example of a bad I18n rails test… Found some tests failing in a project because tests in different files would change I18n.locale, changes like this make your tests fail if the tests are not run in the standard order. since this took me awhile to track down, I thought I should share a quick example for others to find. So if you are having a issue like this remember to add a teardown method that resets I18n.locale to the default local.

<script src="https://gist.github.com/1568648.js?file=I18n_bad_test.rb"> </script>

blog comments powered by Disqus
Dan Mayer Profile Pic

I primary write about Ruby development, distributed teams, & dev/PM process. The archives go back to my first CS classes during college when I was learning to write software. I contribute to a few OSS projects and often work on my own projects. You can find my code on github.

Twitter @danmayer

Github @danmayer