Created
January 11, 2011 18:52
-
-
Save juliend2/774905 to your computer and use it in GitHub Desktop.
video info spec with VCR
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
# at the end of video_info_spec.rb ... | |
context "vcr recorded request" do | |
use_vcr_cassette "fixtures/vcr_cassettes/youtube_recorded", :record => :new_episodes | |
it "should have no views to it" do | |
video = VideoInfo.new('http://www.youtube.com/watch?v=oQ49W_xKzKA') | |
video.view_count.should == 0 | |
end | |
end | |
# spec_helper.rb ... | |
require 'rubygems' | |
require 'rspec' | |
require 'video_info' | |
require 'vcr' | |
RSpec.configure do |config| | |
config.extend VCR::RSpec::Macros | |
# config.before(:each) do | |
# VCR::Config.stub_with :webmock | |
# end | |
config.color_enabled = true | |
config.filter_run :focus => true | |
config.run_all_when_everything_filtered = true | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment