Sha256: 1a9739c424cb82e01e54a1e9ad5e9bb8fb38dc40e04e61a977da85dedffeb8e4

Contents?: true

Size: 615 Bytes

Versions: 103

Compression:

Stored size: 615 Bytes

Contents

require 'fog/openstack/requests/image/create_image'
require 'fog/openstack/requests/image/delete_image'
require 'fog/openstack/requests/image/list_public_images_detailed'

module PatchedFog
  def self.included(spec)
    spec.before do
      stub_const('::Fog::Image::OpenStack::Mock', PatchedFog::ImageMock)
      stub_const('::Fog::Time', ::Time)
    end
  end

  class ImageMock < Fog::Image::OpenStack::Mock
    def delete_image(image_id)
      # Temporarily do what Fog's mock should have doneā€“keep state of images up to date.
      self.data[:images].delete(image_id)
      super(image_id)
    end
  end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
vm_shepherd-3.7.3 spec/support/patched_fog.rb
vm_shepherd-3.7.1 spec/support/patched_fog.rb
vm_shepherd-3.7.0 spec/support/patched_fog.rb
vm_shepherd-3.6.2 spec/support/patched_fog.rb
vm_shepherd-3.6.1 spec/support/patched_fog.rb
vm_shepherd-3.6.0 spec/support/patched_fog.rb
vm_shepherd-3.5.0 spec/support/patched_fog.rb
vm_shepherd-3.4.3 spec/support/patched_fog.rb
vm_shepherd-3.4.2 spec/support/patched_fog.rb
vm_shepherd-3.4.1 spec/support/patched_fog.rb
vm_shepherd-3.4.0 spec/support/patched_fog.rb
vm_shepherd-3.3.2 spec/support/patched_fog.rb
vm_shepherd-3.3.1 spec/support/patched_fog.rb
vm_shepherd-3.3.0 spec/support/patched_fog.rb
vm_shepherd-3.2.1 spec/support/patched_fog.rb
vm_shepherd-3.2.0 spec/support/patched_fog.rb
vm_shepherd-3.1.8 spec/support/patched_fog.rb
vm_shepherd-3.1.7 spec/support/patched_fog.rb
vm_shepherd-3.1.6 spec/support/patched_fog.rb
vm_shepherd-3.1.5 spec/support/patched_fog.rb