Created
January 5, 2011 21:33
-
-
Save kenmazaika/767058 to your computer and use it in GitHub Desktop.
Auto Hooks up tests to use VCR.
This file contains 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 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