Sha256: 827b0b8eb767ede55ce57bf935fff55bade27d561a397c2ff8bd6b7d08c72d6d

Contents?: true

Size: 701 Bytes

Versions: 5

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'

describe Roark::Aws::Ec2::CreateAmi do
  it "should return the state of the given ami" do
    image_stub      = stub 'image', :state => :available
    images_mock     = mock 'images'
    ec2_stub        = stub :images => images_mock
    connection_stub = stub 'connection', :ec2 => ec2_stub
    images_mock.should_receive(:create).
                with(:instance_id => 'i-12345678',
                     :name        => 'test123').
                and_return 'an_image'
    create_ami = Roark::Aws::Ec2::CreateAmi.new connection_stub
    expect(create_ami.create(:instance_id => 'i-12345678',
                             :name        => 'test123')).to eq('an_image')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roark-0.2.2 spec/aws/ec2/create_ami_spec.rb
roark-0.2.1 spec/aws/ec2/create_ami_spec.rb
roark-0.2.0 spec/aws/ec2/create_ami_spec.rb
roark-0.1.0 spec/aws/ec2/create_ami_spec.rb
roark-0.0.1 spec/aws/ec2/create_ami_spec.rb