Trevor blogged Time Bomb Test
in 2009, which made this article obsolete. Then, the day after, Jeremy McAnally wrote Deprecate
, a gem to automate some versions of time bombing your tests.
Sometimes, I have an idea for a test, but I am testing something else and I don’t want to break my thought flow.
In those cases, I will write myself a time bomb:
1 def test_has_more_entries_after_update
2 flunk if Time.now > Time.local(2005, 12, 9, 10, 0, 0)
This test will pass, until Dec 9 2005, 10 AM. Nice way to not forget to add some tests.
I am François Beausoleil, a Ruby on Rails and Scala developer. During the day, I work on Seevibes, a platform to measure social interactions related to TV shows. At night, I am interested many things. Read my biography.
Books I read and recommend
Projects I work on
Projects I worked on