Sha256: 7640e374efc360a72a51a842b4626715b7fd5a3724d8d4f079efb1e9abf18447

Contents?: true

Size: 523 Bytes

Versions: 71

Compression:

Stored size: 523 Bytes

Contents

require "spec_helper"

describe Onebox::Engine::JSON do
  before(:all) do
    @link = "http://stackoverflow.com"
    fake(@link, response("stackexchange"))
  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.23 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.22 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.21 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.20 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.19 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.18 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.17 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.16 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.14 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.13 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.12 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.11 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.10 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.9 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.8 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.7 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.6 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.5 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.3 spec/lib/onebox/engine/json_spec.rb
onebox-1.5.2 spec/lib/onebox/engine/json_spec.rb