Sha256: fbf1a6cfde0b1c5f126c5b246c7fc09e311631adbab0e544050be710c50306ef
Contents?: true
Size: 799 Bytes
Versions: 32
Compression:
Stored size: 799 Bytes
Contents
require 'spec_helper' require 'bosh/stemcell/aws/ami' module Bosh::Stemcell::Aws describe Ami do let(:stemcell) do stemcell = double('Bosh::Dev::Stemcell') stemcell_manifest = { 'cloud_properties' => { 'ami' => '' } } stemcell.stub(:extract).and_yield('/foo/bar', stemcell_manifest) stemcell end subject(:ami) do Ami.new(stemcell, instance_double('Bosh::Stemcell::Aws::Region', name: 'fake-region')) end before do Logger.stub(:new) end describe 'publish' do it 'creates a new ami' do provider = instance_double('Bosh::AwsCloud::Cloud', create_stemcell: 'fake-ami-id').as_null_object Bosh::Clouds::Provider.stub(create: provider) expect(ami.publish).to eq('fake-ami-id') end end end end
Version data entries
32 entries across 32 versions & 1 rubygems