Skip to content

Commit

Permalink
Reproduce radar#44.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jul 2, 2020
1 parent b4a601b commit d38961f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/lib/dotiw_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,15 @@
[START_TIME,
START_TIME + 1.year + 2.months + 3.weeks + 4.days + 5.hours + 6.minutes + 7.seconds,
{ vague: nil },
'1 year, 2 months, 3 weeks, 4 days, 5 hours, 6 minutes, and 7 seconds']
'1 year, 2 months, 3 weeks, 4 days, 5 hours, 6 minutes, and 7 seconds'],
[START_TIME,
START_TIME + 1.year + 2.months,
{ vague: true, locale: :en },
'about 1 year'],
[START_TIME,
START_TIME + 1.year + 2.months,
{ vague: true, locale: :nb },
'rundt 1 år']
].each do |start, finish, options, output|
it "should be #{output}" do
expect(distance_of_time_in_words(start, finish, true, options)).to eq(output)
Expand Down

0 comments on commit d38961f

Please sign in to comment.