Skip to content

Instantly share code, notes, and snippets.

@selmanj
Created September 7, 2016 20:27
Show Gist options
  • Save selmanj/0c322803464b9b7d5032ad95ca732457 to your computer and use it in GitHub Desktop.
Save selmanj/0c322803464b9b7d5032ad95ca732457 to your computer and use it in GitHub Desktop.
describe ManageIQ::Providers::Google::CloudManager::RefreshParser do
it 'doesnt entirely crash when pulling data' do
empty_collection = double(Fog::Collection, :all => [])
connection = double(
"Fog::Compute::Google::Real",
:disks => empty_collection,
:flavors => [],
:forwarding_rules => empty_collection,
:images => empty_collection,
:projects => double(
"Fog::Collection",
:get => double(:common_instance_metadata => {}),
:all => []),
:servers => empty_collection,
:snapshots => empty_collection,
:target_pools => empty_collection,
:zones => empty_collection)
ems = instance_double(
"ManageIQ::Providers::Google::CloudManager",
:name => "GoogleStub",
:id => 11,
:project => "foobar",
:connect => connection)
parser = ManageIQ::Providers::Google::CloudManager::RefreshParser.new(ems)
puts parser.ems_inv_to_hashes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment