diff --git a/test/date_strptime_scenarios.rb b/test/date_strptime_scenarios.rb index de3d619..cb2c106 100644 --- a/test/date_strptime_scenarios.rb +++ b/test/date_strptime_scenarios.rb @@ -18,6 +18,11 @@ def test_date_strptime_day_of_year_without_year assert_equal Date.strptime("153", '%j'), Date.new(1984, 6, 1) end + def test_date_strptime_day_of_year_with_year + assert_equal Date.strptime("1999 153", '%Y %j'), Date.new(1999, 6, 2) + end + + def test_date_strptime_without_specifying_format assert_equal Date.strptime('1999-04-14'), Date.new(1999, 4, 14) end