arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 127 forks source link

Testing expiration times with Timecop? #179

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm using memcached 1.8.0 with Rails and I'm wondering if there's an example of using Timecop to test the expiration of a key or do I have to rely on sleep? I was thinking of using Rspec's mocking ability but then I wouldn't really be testing my memcached layer.