“For your unit tests, it is faster to use a Memcached mock than the real
deal.”
Faster is fine but will it work with memcached? It doesn’t work with
mine, I suspect the cache is not cleared between tests. I suspect this
is just a documentation issue.
This is a great GEM but it’s sad that documentation corrections are on
various forums. :-\
One other question. to get it to work I needed to require memcache in
my initializer. Anyone know why this is? Here it is (pieced together
from various forums)
mine, I suspect the cache is not cleared between tests. I suspect this
is just a documentation issue.
For properly clearing the cache before each test, you should reference
the
link below to create a suitable ‘setup’ and ‘teardown’ methods for your
unit,
functional, and integration tests.
This is a great GEM but it’s sad that documentation corrections are on
various forums. :-\
One other question. to get it to work I needed to require memcache in
my initializer. Anyone know why this is? Here it is (pieced together
from various forums)
In short, it’s part of the Rails application initialization process and
it
must be
completed before the Rails application is ready for use. For example,
if
you take
a look at the file in #{RAILS_ROOT}/config/initializers, you’ll see
other
files
that are part of the application initialization process. Furthermore,
this
process
usually takes place after the loading of both plugins and gems.
Thanks for the pointers Conrad. It seems this project has several
active forks on github. How does one go about choosing one? My hunch
is to go with a fork that is still active but my fear is that it may
diverge from what the original author intended and will become
deprecated.
Thanks for the pointers Conrad. It seems this project has several
active forks on github. How does one go about choosing one? My hunch
is to go with a fork that is still active but my fear is that it may
diverge from what the original author intended and will become
deprecated.