summaryrefslogtreecommitdiff
path: root/test/json/test_json_string_matching.rb
diff options
context:
space:
mode:
authorMichael Leibowitz <michael.leibowitz@intel.com>2013-08-15 15:02:54 -0700
committerMichael Leibowitz <michael.leibowitz@intel.com>2013-08-15 15:02:54 -0700
commit6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06 (patch)
treed9d59f4b502927634d32832e963db76629ff5a2e /test/json/test_json_string_matching.rb
parent3b35de2a90e26b99e2a6d4f61dc56d6ce7ded748 (diff)
downloadruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.tar.gz
ruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.tar.bz2
ruby-6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06.zip
Imported Upstream version 1.9.3.p448upstream/1.9.3.p448upstream
Diffstat (limited to 'test/json/test_json_string_matching.rb')
-rw-r--r--test/json/test_json_string_matching.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/json/test_json_string_matching.rb b/test/json/test_json_string_matching.rb
index df26a68..7335c0e 100644
--- a/test/json/test_json_string_matching.rb
+++ b/test/json/test_json_string_matching.rb
@@ -27,14 +27,13 @@ class TestJsonStringMatching < Test::Unit::TestCase
t = TestTime.new
t_json = [ t ].to_json
assert_equal [ t ],
- JSON.parse(t_json,
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
+ JSON.parse(t_json, :create_additions => true,
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
assert_equal [ t.strftime('%FT%T%z') ],
- JSON.parse(t_json,
- :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
+ JSON.parse(t_json, :create_additions => true,
+ :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
assert_equal [ t.strftime('%FT%T%z') ],
JSON.parse(t_json,
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime },
- :create_additions => false)
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
end
end