Skip to content

Instantly share code, notes, and snippets.

@mcfiredrill
Created October 26, 2011 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfiredrill/1316926 to your computer and use it in GitHub Desktop.
Save mcfiredrill/1316926 to your computer and use it in GitHub Desktop.
☺ 263A 1 ☻ 263B 2 ♥ 2665 3 ♦ 2666 4 ♣ 2663 5 ♠
def assert_cache_works(key, procs)
#code that creates cache
procs[:cache].call
assert Rails.cache.exist?(key)
#code that should clear the cache
procs[:clear].call
assert !Rails.cache.exist?(key)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment