Sha256: 8f3ffc32e21c97acf9272adbacdd9db942f3866ab9c598fb691639e2cb72a39c

Contents?: true

Size: 406 Bytes

Versions: 28

Compression:

Stored size: 406 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

28 entries across 28 versions & 1 rubygems

Version Path
ree_lib-1.0.39 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.38 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.37 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.36 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.35 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.34 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.33 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.32 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.31 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.30 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.29 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.28 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.27 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.26 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.24 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.23 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.22 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.21 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.20 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb
ree_lib-1.0.19 lib/ree_lib/packages/ree_json/spec/ree_json/functions/from_json_spec.rb