Sha256: 111bd17a6cecb0b8eaf9ac100da4f23c7ab55e037b5972113c602bb9bfc31420

Contents?: true

Size: 405 Bytes

Versions: 26

Compression:

Stored size: 405 Bytes

Contents

# frozen_string_literal: true

RSpec.describe :from_json do
  link :from_json, from: :ree_json

  it {
    expect(from_json("{\"id\":1}", symbol_keys: true)).to eq({id: 1})
  }

  it {
    result = from_json("{\":id\":{\"^o\":\"Object\"}}", mode: :object)
    expect(result[:id]).to be_a(Object)
  }

  it {
    expect{from_json("{213: \"123\"}")}.to raise_error(ReeJson::FromJson::ParseJsonError)
  }
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ree_lib-1.0.65 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.64 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.63 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.62 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.61 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.60 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.59 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.58 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.57 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.56 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.55 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.54 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.53 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.52 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.51 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.50 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.49 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.48 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.47 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.46 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb