emery 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f274712dc6632b3ab10cc2f51259f9b1b8c4ed411c2480a2c29f3ad1024d1366
4
- data.tar.gz: 24c03d4e4af1c063fffcab685c5c4d2e1b68723fdd2d087f0d27e7d265cb2422
3
+ metadata.gz: 26f2aead0af20ab4b3b2e2a131f4fa177d416d94479f60a1c471e8971dcd2635
4
+ data.tar.gz: 19d9f6d0cb96aff5b25fe7ca2aeb85db3996fd4e74d8918add3b037fbf27a5c6
5
5
  SHA512:
6
- metadata.gz: 66e3dc27fcf2eb03f85dbae15d04b91758f624e4dd6aea7cd0ce4b074d128ab43dbec522b4b4b251119debcc6425152cc595caa9425074ba474cb5ddc2e66c7c
7
- data.tar.gz: 5f7bc33da37df73954e251fdf55297d3855e857c06f71d32cef87f0dc855388f04a83ddae5941d72c443bf15e006d31c217952d308ad18cbd165bb845a8e19be
6
+ metadata.gz: e1c09640543db95471da8ea42578c6fa36732baad6061af415373822f45fdc62fb55c65edddafad4cc7f61f26d7d4d1a277ac5549428b7062fdc96062b4c0a8b
7
+ data.tar.gz: bcbd606c0041721f4ec4df3e81bff0c881721b8ac52272109e84fa06026c9ea0890b4ff920dfced918a379957c1846eade1855764e43e952dfa9ba2d18d26785
@@ -72,7 +72,7 @@ module Jsoner
72
72
  types.each do |type|
73
73
  begin
74
74
  return Jsoner.deserialize(type, json_value)
75
- rescue TypeError
75
+ rescue JsonerError
76
76
  end
77
77
  end
78
78
  raise JsonerError.new("Value '#{json_value.inspect.to_s}' can not be deserialized as any of #{@types.map { |t| t.to_s}.join(', ')}")
@@ -33,10 +33,16 @@ class PlainTypesDeserialization < Test::Unit::TestCase
33
33
  end
34
34
  end
35
35
 
36
- def test_deserialize_boolean
36
+ def test_deserialize_true
37
37
  data = Jsoner.from_json(Boolean, 'true')
38
38
  T.check(Boolean, data)
39
- assert_equal true, data, "Boolean should be parsable from JSON"
39
+ assert_equal true, data, "Boolean true should be parsable from JSON"
40
+ end
41
+
42
+ def test_deserialize_false
43
+ data = Jsoner.from_json(Boolean, 'false')
44
+ T.check(Boolean, data)
45
+ assert_equal false, data, "Boolean false should be parsable from JSON"
40
46
  end
41
47
 
42
48
  def test_deserialize_boolean_fail
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Sapronov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json