Sha256: f8c488bdc8a4fc52a2e9936a7d303f5a98fcd631f7d70d05e94b193bc09da386

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

require_relative 'spec_helper'

describe YTId do
  subject { YTId }
  let(:id){ "RCUkmUXMd_k" }

  [ 
    "http://www.youtube.com/v/RCUkmUXMd_k",
    "http://www.youtube.com/v/RCUkmUXMd_k?version=3&hl=en_US&rel=0",
    "http://www.youtube.com/embed/RCUkmUXMd_k?rel=0",
    "http://www.youtube.com/watch?v=RCUkmUXMd_k",
    "http://www.youtube.com/watch?v=RCUkmUXMd_k&feature=related",
    "http://www.youtube.com/watch?v=RCUkmUXMd_k#t=0m10s",
    "http://www.youtube.com/user/ForceD3strategy#p/a/u/0/RCUkmUXMd_k",
    "http://youtu.be/RCUkmUXMd_k"
  ].each do |url|
    it "extracts youtube id from the given url" do
      subject.from( url ).should == id
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yt_id-0.0.1 spec/yt_id_spec.rb