smarter_dates 0.2.7.11 → 0.2.7.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/smarter_dates/parser.rb +1 -1
- data/lib/smarter_dates/version.rb +1 -1
- data/test/smarter_dates_test.rb +12 -0
- metadata +1 -1
data/lib/smarter_dates/parser.rb
CHANGED
data/test/smarter_dates_test.rb
CHANGED
@@ -49,6 +49,18 @@ class SmarterDatesTest < Test::Unit::TestCase
|
|
49
49
|
assert_equal yesterday.year, @model.updated_at.year
|
50
50
|
assert_equal yesterday.month, @model.updated_at.mon
|
51
51
|
assert_equal yesterday.day, @model.updated_at.mday
|
52
|
+
assert_equal yesterday.day, @model.updated_at.mday
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_parsing_failures
|
56
|
+
@model.birth_d = "32 April 1976"
|
57
|
+
assert_equal nil, @model.birth_d
|
58
|
+
|
59
|
+
# TODO: fix this in chronic
|
60
|
+
if false
|
61
|
+
@model.birth_d = "30 Feb 1976"
|
62
|
+
assert_equal nil, @model.birth_d
|
63
|
+
end
|
52
64
|
end
|
53
65
|
end
|
54
66
|
|