Desired behavior:
metadata = Metadata.new
metadata.data.should be_nil
metadata.data.nested_data.should be_nil
metadata.should == {}
metadata.data = {}
metadata.should == {data: {}}
Current Behavior:
metadata = Metadata.new
metadata.data == {}
metadata.data.nested_data == {}
metadata == {data: {nested_data: {}}
this is a problem if one of the nested keys we call is eventually supposed to be a non Hash
example:
metadata = Metadata.new
id = metadata.property.id
klass.find(id)
=> errors cause id is a hash, rather than an id or nil