Sha256: eb81e3245e36e35346b8f5eed5d9e87ce8a5a0264f9c992088436ecbaf810eb5

Contents?: true

Size: 821 Bytes

Versions: 2

Compression:

Stored size: 821 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::VimeoOnebox do
  let(:link) { "http://vimeo.com" }
  before do
    fake(link, response("vimeo.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("108 years of Herman Miller in 108 seconds")
    end

    it "returns video photo" do
      expect(html).to include("443673159_1280.jpg")
    end

    it "returns video description" do
      expect(html).to include("To mark the launch of a new website for Hermann Miller furniture")
    end

    it "returns video URL" do
      expect(html).to include("http://vimeo.com/moogaloop.swf?clip_id=70437049")
    end

    it "returns URL" do
      expect(html).to include(link)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onebox-1.0.1 spec/lib/onebox/engine/vimeo_spec.rb
onebox-1.0.0 spec/lib/onebox/engine/vimeo_spec.rb