I nedd pour tester ce code. Son intérieur d'un application_helper dans mon application rails.Comment tester ce code avec RSpec 3.5?
def greet
now = Time.now
today = Date.today.to_time
morning = today.beginning_of_day
noon = today.noon
evening = today.change(hour: 17)
night = today.change(hour: 20)
tomorrow = today.tomorrow
if (morning..noon).cover? now
'Good Morning'
elsif (noon..evening).cover? now
'Good Afternoon'
elsif (evening..night).cover? now
'Good Evening'
end
end