# Unit tests for the Youporn class. Basically just checking # the results of parse_video_url for now. require 'test/unit' require 'src/websites/youporn' class YoupornTest < Test::Unit::TestCase def test_parse_video_url yp = Youporn.new() page_data = nil File.open('test/fixtures/youporn/page_data-65778.html') do |f| page_data = f.read end test_result = yp.send('parse_video_url', page_data) assert_equal('http://download.youporn.com/download/112911/flv/65778_moaning_mom_fucked_at_night.flv', test_result) end end