diff --git a/app/models/manager_refresh/inventory_collection/builder.rb b/app/models/manager_refresh/inventory_collection/builder.rb index 8200842a2292..0b06e61ad735 100644 --- a/app/models/manager_refresh/inventory_collection/builder.rb +++ b/app/models/manager_refresh/inventory_collection/builder.rb @@ -80,7 +80,7 @@ def construct_data # Creates InventoryCollection def to_inventory_collection if @properties[:model_class].nil? && !@options[:without_model_class] - raise MissingModelClassError + raise MissingModelClassError, "Missing model_class for :#{@name} (\"#{@name.to_s.classify}\" or subclass expected)." end ::ManagerRefresh::InventoryCollection.new(to_hash) diff --git a/spec/models/manager_refresh/inventory_collection/builder_spec.rb b/spec/models/manager_refresh/inventory_collection/builder_spec.rb index 45a5cc649dd6..94cdcfebcf98 100644 --- a/spec/models/manager_refresh/inventory_collection/builder_spec.rb +++ b/spec/models/manager_refresh/inventory_collection/builder_spec.rb @@ -58,7 +58,7 @@ def create_persister it 'throws exception if model_class not specified' do builder = cloud.prepare_data(:non_existing_ic, persister_class) - expect { builder.to_inventory_collection }.to raise_error(::ManagerRefresh::InventoryCollection::Builder::MissingModelClassError) + expect { builder.to_inventory_collection }.to raise_error(::ManagerRefresh::InventoryCollection::Builder::MissingModelClassError, /NonExistingIc/) end # --- adv. settings (TODO: link to gui)---