Sha256: e4c58295509c9ab899f5ef0cdf86b9a079ba4483015354b09832878f48873595
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
# encoding: UTF-8 require 'spec_helper' describe VideoInfo::Providers::Vkontakte do describe ".usable?" do subject { VideoInfo::Providers::Vkontakte.usable?(url) } context "with vkontakte url" do let(:url) { 'http://vk.com/video39576223_108370515' } it { should be_true } end context "with other url" do let(:url) { 'http://www.youtube.com/898029' } it { should be_false } end end context "with video 39576223_108370515", :vcr do subject { VideoInfo.new('http://vk.com/video39576223_108370515') } its(:provider) { should eq 'Vkontakte' } its(:video_owner) { should eq '39576223' } its(:video_id) { should eq '108370515' } its(:url) { should eq 'http://vk.com/video39576223_108370515' } its(:embed_url) { should eq 'vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af' } its(:embed_code) { should eq '<iframe src="http://vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af" frameborder="0" allowfullscreen="allowfullscreen"></iframe>' } its(:title) { should eq 'Я уточка))))) | VK' } its(:description) { should eq 'это ВЗРЫВ МОЗГА!!! Просто отвал башки...' } its(:keywords) { should eq 'это ВЗРЫВ МОЗГА!!! Просто отвал башки...' } its(:duration) { should eq 183 } its(:width) { should eq 320 } its(:height) { should eq 240 } its(:view_count) { should be > 10 } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
video_info-2.0.0 | spec/lib/video_info/providers/vkontakte_spec.rb |