diff options
Diffstat (limited to 'test/json/json_addition_test.rb')
-rw-r--r-- | test/json/json_addition_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/json/json_addition_test.rb b/test/json/json_addition_test.rb index 614c735567..3a7a58176a 100644 --- a/test/json/json_addition_test.rb +++ b/test/json/json_addition_test.rb @@ -1,5 +1,5 @@ #frozen_string_literal: false -require 'test_helper' +require_relative 'test_helper' require 'json/add/core' require 'json/add/complex' require 'json/add/rational' @@ -183,14 +183,14 @@ class JSONAdditionTest < Test::Unit::TestCase def test_bigdecimal assert_equal BigDecimal('3.141', 23), JSON(JSON(BigDecimal('3.141', 23)), :create_additions => true) assert_equal BigDecimal('3.141', 666), JSON(JSON(BigDecimal('3.141', 666)), :create_additions => true) - end + end if defined?(::BigDecimal) def test_ostruct o = OpenStruct.new # XXX this won't work; o.foo = { :bar => true } o.foo = { 'bar' => true } assert_equal o, parse(JSON(o), :create_additions => true) - end + end if defined?(::OpenStruct) def test_set s = Set.new([:a, :b, :c, :a]) |