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.18 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.17 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.16 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.15 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.14 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.13 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.12 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.11 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.10 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.9 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.8 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.7 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.6 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.5 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.4 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.3 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.2 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.1 spec/lib/onebox/engine/json_spec.rb
onebox-1.8.0 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.9 spec/lib/onebox/engine/json_spec.rb