add observations to to_h
This commit is contained in:
parent
9cc86289e1
commit
df9f763b45
@ -322,6 +322,7 @@ module AVM
|
||||
def to_h
|
||||
hash = Hash[HASH_FIELDS.collect { |key| [ key, send(key) ] }]
|
||||
hash[:creator] = creator.to_a
|
||||
hash[:observations] = observations.collect(&:to_h)
|
||||
hash
|
||||
end
|
||||
|
||||
|
@ -172,7 +172,8 @@ describe AVM::Image do
|
||||
:metadata_date => Time.parse(metadata_date),
|
||||
:metadata_version => metadata_version,
|
||||
:subject_names => subject_names,
|
||||
:categories => categories
|
||||
:categories => categories,
|
||||
:observations => []
|
||||
} }
|
||||
|
||||
its(:distance) { should == [ light_years, redshift ] }
|
||||
|
Loading…
Reference in New Issue
Block a user