require "spec_helper" describe Onebox::Engine::CollegeHumorOnebox do let(:link) { "http://collegehumor.com" } before do fake(link, response("collegehumor.response")) end it_behaves_like "engines" describe "#to_html" do let(:html) { described_class.new(link).to_html } it "returns video title" do expect(html).to include("Mitt Romney Style (Gangnam Style Parody)") end it "returns video image" do expect(html).to include("a9febe641d5beb264bbab0de49272e5a-mitt-romney-style-gangnam-style-parody.jpg") end it "returns video description" do expect(html).to include("Heyyy wealthy ladies!"Mitt Romney Style" is now available on iTunes") end it "returns video URL" do expect(html).to include("moogaloop.1.0.31.swf?clip_id=6830834&use_node_id=true&og=1&auto=true") end it "returns URL" do expect(html).to include(link) end end end