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