[rspec-users] What is the pattern for testing a time argument using argument matcher

Yi Wen hayafirst at gmail.com
Thu Jan 26 10:44:58 EST 2012

Say I do:

object.method 5.days.ago

In the test I want to test using should_receive like:


This will fail since two time objects aren't exact the same.

What is the general pattern for testing this in rspec?


More information about the rspec-users mailing list