spec/support/feed/item.rb in mongoid-scroll-0.3.5 vs spec/support/feed/item.rb in mongoid-scroll-0.3.6

- old
+ new

@@ -8,8 +8,12 @@ field :a_datetime, type: DateTime field :a_date, type: Date field :a_time, type: Time field :a_array, type: Array - embeds_many :embedded_items + embeds_many :embedded_items, class_name: 'Feed::EmbeddedItem' + + publisher_options = { class_name: 'Feed::Publisher' } + publisher_options[:optional] = true if Mongoid::Compatibility::Version.mongoid6? || Mongoid::Compatibility::Version.mongoid7? + belongs_to :publisher, publisher_options end end