Sha256: 5693d5396df201245b7f52488925f2e96bbb9953d3ad423493504fb4184af7ab
Contents?: true
Size: 597 Bytes
Versions: 11
Compression:
Stored size: 597 Bytes
Contents
require "test_helper" class ObjectTest < Minitest::Test def test_creating_object_from_hash assert_equal "bar", Calendlyr::Object.new(foo: "bar").foo end def test_nested_hash assert_equal "foobar", Calendlyr::Object.new(foo: {bar: {baz: "foobar"}}, client: nil).foo.bar.baz end def test_nested_number assert_equal 1, Calendlyr::Object.new(foo: {bar: 1}, client: nil).foo.bar end def test_array object = Calendlyr::Object.new(foo: [{bar: :baz}], client: nil) assert_equal OpenStruct, object.foo.first.class assert_equal :baz, object.foo.first.bar end end
Version data entries
11 entries across 11 versions & 1 rubygems