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.8.39 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.38 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.36 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.35 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.34 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.33 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.32 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.31 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.30 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.29 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.28 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.27 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.26 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.25 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.24 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.23 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.22 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.21 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.20 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.19 spec/lib/onebox/engine/json_spec.rb