A fun one that I came across was a test (in an old rails app I was maintaining) that failed only on the 29th January in years preceding leap year.<p>The test was:<p><pre><code>  Subscription.new (starts_at: 1.month.from_now).ends_at.should == 13.months.from_now
</code></pre>
On 29th Jan 2015, 13.months.from_now is 29th Feb 2016; but 1.month.from_now = 28th Feb, plus a year gives 28th Feb 2016.<p>(Possible conclusion: when using activesupport-style magic date helpers, look up their exact semantics and be sure that what they&#x27;re doing is what you mean them to do...)