3 ms·
if i recall, it was a bug that would come and go from our tests depending on when you ran them. Sometimes the math worked out, other times it was off. We knew t
by meesterdude 11y ago
if i recall, it was a bug that would come and go from our tests depending on when you ran them. Sometimes the math worked out, other times it was off. We knew the code worked, but couldn't figure out why the specs kept failing for it randomly.
- bazzargh 11y agoeek. Time tests should be using something like https://github.com/travisjeffery/timecop https://github.com/travisjeffery/timecop for repeatability. If you do mean to allow random starting values like that, you should look into property-based testing http://www.troikatech.com/blog/2014/04/02/property-based-testing-in-ruby http://www.troikatech.com/blog/2014/04/02/property-based-tes... - test hundreds of possible values at a time, instead of just the one time you ran the tests at.