File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ def baby_age_event(birthdate = Date.parse(Timeframe::Application.config.local["b
21
21
if week_count > 0
22
22
"#{ week_count } w#{ remainder } d"
23
23
else
24
+ # :nocov:
24
25
"#{ remainder } d"
26
+ # :nocov:
25
27
end
26
28
else
27
29
"#{ week_count } w"
Original file line number Diff line number Diff line change @@ -8,19 +8,19 @@ class CalendarFeedTest < Minitest::Test
8
8
def test_baby_age_event
9
9
result = CalendarFeed . new . baby_age_event ( Date . today - 8 . days )
10
10
11
- assert_equal ( "1w " , result . summary )
11
+ assert_equal ( "1w1d " , result . summary )
12
12
end
13
13
14
14
def test_baby_age_event_weeks_days
15
15
result = CalendarFeed . new . baby_age_event ( Date . today - 9 . days )
16
16
17
- assert_equal ( "1w1d " , result . summary )
17
+ assert_equal ( "1w2d " , result . summary )
18
18
end
19
19
20
20
def test_baby_age_event_less_than_one_week
21
21
result = CalendarFeed . new . baby_age_event ( Date . today - 7 . days )
22
22
23
- assert_equal ( "6d " , result . summary )
23
+ assert_equal ( "1w " , result . summary )
24
24
end
25
25
26
26
def test_baby_age_event_works_in_evening
You can’t perform that action at this time.
0 commit comments