Created
April 3, 2012 16:10
-
-
Save itspriddle/2293241 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cacher | |
def self.extended(base) | |
base.class_eval do | |
before do | |
if subject.respond_to?(:caches_action) && cache_path = example.metadata[:cache] | |
subject.caches_action cache_path | |
end | |
end | |
end | |
end | |
end | |
RSpec.configure do |c| | |
c.extend Cacher, :type => :controller | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment