Skip to content

Commit

Permalink
InventoryCollection's Builder exception message
Browse files Browse the repository at this point in the history
Adds message with suggestion of model_class.
  • Loading branch information
slemrmartin committed Aug 27, 2018
1 parent 01044b9 commit 7ebe34e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(::ManageIQ::Providers::Inventory::Persister::Builder::MissingModelClassError)
expect { builder.to_inventory_collection }.to raise_error(::ManagerRefresh::InventoryCollection::Builder::MissingModelClassError, /NonExistingIc/)
end

# --- adv. settings (TODO: link to gui)---
Expand Down

0 comments on commit 7ebe34e

Please sign in to comment.