Skip to content

Commit

Permalink
Fix test stubs for [GH-101].
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljb committed Dec 31, 2014
1 parent 1d9e65d commit 07f04aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,16 @@ def call
@child_resource_pool = double('testresourcepool')
@root_resource_pool = double('pools', :find => @child_resource_pool)

@compute_resource = RbVmomi::VIM::ComputeResource.new(nil, nil)
@compute_resource.stub(:resourcePool).and_return(@root_resource_pool)

@host_folder = double('hostFolder', :childEntity => double('childEntity', :find => @compute_resource))

@data_center = double('data_center',
:vmFolder => vm_folder,
:pretty_path => "data_center/#{vm_folder}",
:find_compute_resource => double('compute resource', :resourcePool => @root_resource_pool))
:find_compute_resource => @compute_resource,
:hostFolder => @host_folder)

@device = RbVmomi::VIM::VirtualEthernetCard.new
@device.stub(:backing).and_return(RbVmomi::VIM::VirtualEthernetCardNetworkBackingInfo.new)
Expand Down

0 comments on commit 07f04aa

Please sign in to comment.