Sha256: d610bbbccee0ce838936e38f2f41ded1605b8092537c3c30375c443351017ef1
Contents?: true
Size: 527 Bytes
Versions: 34
Compression:
Stored size: 527 Bytes
Contents
require 'helper' module Bixby module Test class TestJsonify < MiniTest::Unit::TestCase def test_to_json j = JFoo.new j.bar = "baz" json = j.to_json assert json assert_equal '{"bar":"baz"}', json end def test_from_json j1 = JFoo.new j1.bar = "baz" j2 = JFoo.from_json(j1.to_json) assert_equal "baz", j2.bar j3 = JFoo.from_json('{"bar":"baz"}') assert_equal "baz", j3.bar end end # Jsonify class JFoo include Jsonify attr_accessor :bar end end # Test end # Bixby
Version data entries
34 entries across 34 versions & 2 rubygems