Sha256: d48c0f25648705596b71aaa2145e3455516204b3b7d4ec5e3e25a4f99dc7a7c2

Contents?: true

Size: 952 Bytes

Versions: 1

Compression:

Stored size: 952 Bytes

Contents

require 'lib/muri.rb'

shared_examples_for "Youtube parse" do
  it "should be Youtube service" do
    @a.service == 'Youtube'
  end
  
  it "should have media id" do
    @a.media_id == '4CYDFoEz8rg'
  end
  
  it "should have media api id" do
    @a.media_api_id == '4CYDFoEz8rg'
  end
  
  it "should have media url" do
    @a.media_url == 'http://www.youtube.com/watch?v=4CYDFoEz8rg'
  end
  
  it "should have website" do
    @a.website == 'http://www.youtube.com/v/4CYDFoEz8rg'
  end
  
  it "should have thumbnail" do
    @a.media_thumbnail == 'http://i.ytimg.com/vi/4CYDFoEz8rg/default.jpg'
  end
end
describe "Youtube parse first" do
  before (:all) do
    @a = Muri.parse 'http://www.youtube.com/v/4CYDFoEz8rg&hl=en_US&fs=1&'
  end
  it_should_behave_like "Youtube parse"
end
describe "Youtube parse second" do
  before (:all) do
    @a = Muri.parse 'http://www.youtube.com/watch?v=4CYDFoEz8rg'
  end
  it_should_behave_like "Youtube parse"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
muri-0.0.3 test/youtube_test.rb