Project

General

Profile

Feature #4050 » 0010-20000-days-is-less-than-55-years.patch

Alexey Froloff, 2009-10-18 12:51

View differences:

test/unit/helpers/application_helper_test.rb
446 446
    to_test = { Date.today => 'Due in 0 days',
447 447
                Date.today + 1 => 'Due in 1 day',
448 448
                Date.today + 100 => 'Due in about 3 months',
449
                Date.today + 20000 => 'Due in over 55 years',
449
                Date.today + 20000 => 'Due in over 54 years',
450 450
                Date.today - 1 => '1 day late',
451 451
                Date.today - 100 => 'about 3 months late',
452
                Date.today - 20000 => 'over 55 years late',
452
                Date.today - 20000 => 'over 54 years late',
453 453
               }
454 454
    to_test.each do |date, expected|
455 455
      assert_equal expected, due_date_distance_in_words(date)
(9-9/14)