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-1.12.5 spec/support/patched_fog.rb
vm_shepherd-1.12.4 spec/support/patched_fog.rb
vm_shepherd-1.12.3 spec/support/patched_fog.rb
vm_shepherd-1.12.2 spec/support/patched_fog.rb
vm_shepherd-1.12.1 spec/support/patched_fog.rb
vm_shepherd-1.12.0 spec/support/patched_fog.rb
vm_shepherd-1.11.8 spec/support/patched_fog.rb
vm_shepherd-1.11.7 spec/support/patched_fog.rb
vm_shepherd-1.11.6 spec/support/patched_fog.rb
vm_shepherd-1.11.5 spec/support/patched_fog.rb
vm_shepherd-1.11.4 spec/support/patched_fog.rb
vm_shepherd-1.11.3 spec/support/patched_fog.rb
vm_shepherd-1.11.2 spec/support/patched_fog.rb
vm_shepherd-1.11.1 spec/support/patched_fog.rb
vm_shepherd-1.11.0 spec/support/patched_fog.rb
vm_shepherd-1.10.1 spec/support/patched_fog.rb
vm_shepherd-1.10.0 spec/support/patched_fog.rb
vm_shepherd-1.9.1 spec/support/patched_fog.rb
vm_shepherd-1.9.0 spec/support/patched_fog.rb
vm_shepherd-1.8.4 spec/support/patched_fog.rb