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.7.8 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.7 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.6 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.5 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.4 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.3 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.2 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.1 spec/lib/onebox/engine/json_spec.rb
onebox-1.7.0 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.9 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.8 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.7 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.6 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.5 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.4 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.3 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.2 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.1 spec/lib/onebox/engine/json_spec.rb
onebox-1.6.0 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.65 spec/lib/onebox/engine/json_spec.rb