1
$:.unshift(File.dirname(__FILE__))
4
describe "youtube plugin" do
5
DUMMY_YOUTUBE_VIDEO_ID = 1234567890
7
with_fixtures :user_agent => :expected do
8
it 'should render object tag in :user_agent' do |user_agent, expected|
10
plugin = fake_plugin(:youtube)
11
cgi.user_agent = user_agent
13
plugin.youtube(DUMMY_YOUTUBE_VIDEO_ID).should == expected
18
%|<div class="youtube"><a href="http://www.youtube.com/watch?v=#{DUMMY_YOUTUBE_VIDEO_ID}">YouTube (#{DUMMY_YOUTUBE_VIDEO_ID})</a></div>|
21
%|<div class="youtube"><a href="youtube:#{DUMMY_YOUTUBE_VIDEO_ID}">YouTube (#{DUMMY_YOUTUBE_VIDEO_ID})</a></div>|
24
%|\t\t<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/#{DUMMY_YOUTUBE_VIDEO_ID}"></param><embed src="http://www.youtube.com/v/#{DUMMY_YOUTUBE_VIDEO_ID}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>