Sha256: c17c9d46e18ed03d625c5592a6f27e7f1bcdfdf0a279ac673cff8d4e4ce30f1c

Contents?: true

Size: 532 Bytes

Versions: 71

Compression:

Stored size: 532 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::JSON do
  before(:all) do
    @link = "http://stackoverflow.com"
    fake(@link, response("stackexchange-question"))
  end
  before(:each) { Onebox.options.cache.clear }

  describe "#raw" do
    class OneboxEngineJSON
      include Onebox::Engine
      include Onebox::Engine::JSON

      def initialize(link)
        @url = link
      end
    end

    it "returns a hash" do
      object = OneboxEngineJSON.new(@link).send(:raw)
      expect(object).to be_a(Hash)
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
onebox-1.5.64 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.63 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.62 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.61 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.60 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.50 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.49 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.48 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.47 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.45 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.44 spec/lib/onebox/engine/json_spec.rb