Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Created January 5, 2011 21:33
Show Gist options
  • Save kenmazaika/767058 to your computer and use it in GitHub Desktop.
Save kenmazaika/767058 to your computer and use it in GitHub Desktop.
Auto Hooks up tests to use VCR.
module Module
class Klass
class << self
def find_with_vcr(*args)
VCR.use_cassette('klass', :record => :new_episodes) do
find_without_vcr(*args)
end
end
alias_method_chain :find, :vcr
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment