How to fix RSpec test that depends on time passing by

前端 未结 0 1937
星月不相逢
星月不相逢 2021-01-22 02:38

I have the following method in one of my controlllers:

def ping
  @obj.last_ping_at = DateTime.now
  @obj.save!
end

I would like to test that thi

相关标签:
回答
  • 消灭零回复
提交回复
热议问题