On 20/08/12 12:52 -0700, Richard Su wrote:
https://www.aeolusproject.org/redmine/issues/3728

Pool.catalog_images_collection makes call out to warehouse.
Stubbed out that method to return expected values.

Updated with better formatting from jayg.
---
src/features/step_definitions/pool_steps.rb |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/features/step_definitions/pool_steps.rb 
b/src/features/step_definitions/pool_steps.rb
index f575dc2..9635471 100644
--- a/src/features/step_definitions/pool_steps.rb
+++ b/src/features/step_definitions/pool_steps.rb
@@ -141,6 +141,10 @@ end
Given /^"([^"]*)" has catalog_entry "([^"]*)"$/ do |catalog_name, 
catalog_entry_name|
  catalog = Catalog.find_by_name(catalog_name)
  deployable = FactoryGirl.create :deployable, :name => catalog_entry_name, 
:catalogs => [catalog]
+  Pool.any_instance.stub(:catalog_images_collection) do
+    [{:catalog => catalog.name ,:deployable => deployable.name,
+       :image => "name uuid", :provider_images =>[] }]
+  end
end

Given /^"([^"]*)" has catalog_entry with parameters "([^"]*)"$/ do 
|catalog_name, catalog_entry_name|
--
1.7.7.6

ACK/pushed, test works both on f16 system and upstream gems.

-j

Reply via email to