I have an assertion in a test that looks like this:
assert_equals object.sent_at, Time.now
When I run this test, I keep getting an error that looks like this
--- expected
+++ actual
@@ -1 +1 @@
-Fri, 04 Mar 2016 18:57:47 UTC +00:00
+Fri, 04 Mar 2016
I've tried a few combinations to make this test pass.
My actual code updates the sent_at
value with a Time.now
but its not quite in the perfect format. It is close but not enough to pass. How can I make this test pass.
Here are some combinations I've tried in my assertions:
Time.now.utc
Date.today
Time.now
and a lot of to_time
, to_datetime
etc. How can I make the test pass?