Sha256: fac8e58a4f5e082988144b711996db3b6bd362e095f396d3e1f2a42790af54f3

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::OpenGraph do
  before(:all) do
    @link = "http://flickr.com"
    fake(@link, response("flickr"))
  end
  before(:each) { Onebox.defaults.cache.clear }

  let(:link) { @link }

  describe "#raw" do
    class OneboxEngineOpenGraph
      include Onebox::Engine
      include Onebox::Engine::OpenGraph

      def initialize(link)
        @url = link
      end
    end

    it "returns a OpenGraph object that has a metadata method" do
      object = OneboxEngineOpenGraph.new("http://flickr.com").send(:raw)
      expect(object).to respond_to(:metadata)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.1.0 spec/lib/onebox/engine/open_graph_spec.rb