fill in pending specs

This commit is contained in:
Wesley Beary 2009-10-06 20:35:46 -07:00
parent d94722e01a
commit 34294ad441
5 changed files with 49 additions and 33 deletions

View File

@ -11,7 +11,7 @@ module Fog
attribute :instance_id, 'instanceId'
attribute :size
attribute :snapshot_id, 'snapshotId'
attribute :status, 'status'
attribute :status
attribute :volume_id, 'volumeId'
def initialize(attributes = {})

View File

@ -4,14 +4,16 @@ describe 'Fog::AWS::EC2::KeyPair' do
describe "#initialize" do
it "should remap attributes from parser" #do
# address = Fog::AWS::EC2::KeyPair.new(
# 'instanceId' => 'i-00000000',
# 'publicIp' => '0.0.0.0'
# )
# address.instance_id.should == 'i-00000000'
# address.public_ip.should == '0.0.0.0'
# end
it "should remap attributes from parser" do
key_pair = Fog::AWS::EC2::KeyPair.new(
'keyFingerprint' => 'fingerprint',
'keyMaterial' => 'material',
'keyName' => 'name'
)
key_pair.fingerprint.should == 'fingerprint'
key_pair.material.should == 'material'
key_pair.name.should == 'name'
end
end

View File

@ -4,14 +4,18 @@ describe 'Fog::AWS::EC2::SecurityGroup' do
describe "#initialize" do
it "should remap attributes from parser" #do
# address = Fog::AWS::EC2::SecurityGroup.new(
# 'instanceId' => 'i-00000000',
# 'publicIp' => '0.0.0.0'
# )
# address.instance_id.should == 'i-00000000'
# address.public_ip.should == '0.0.0.0'
# end
it "should remap attributes from parser" do
security_group = Fog::AWS::EC2::SecurityGroup.new(
'groupDescription' => 'description',
'groupName' => 'name',
'ipPermissions' => 'permissions',
'ownerId' => 'owner'
)
security_group.group_description.should == 'description'
security_group.group_name.should == 'name'
security_group.ip_permissions.should == 'permissions'
security_group.owner_id.should == 'owner'
end
end

View File

@ -4,14 +4,16 @@ describe 'Fog::AWS::EC2::Snapshots' do
describe "#initialize" do
it "should remap attributes from parser" # do
# snapshot = Fog::AWS::EC2::Address.new(
# 'instanceId' => 'i-00000000',
# 'publicIp' => '0.0.0.0'
# )
# address.instance_id.should == 'i-00000000'
# address.public_ip.should == '0.0.0.0'
# end
it "should remap attributes from parser" do
snapshot = Fog::AWS::EC2::Snapshot.new(
'snapshotId' => 'snap-00000000',
'startTime' => 'now',
'volumeId' => 'vol-00000000'
)
snapshot.snapshot_id.should == 'snap-00000000'
snapshot.start_time.should == 'now'
snapshot.volume_id.should == 'vol-00000000'
end
end

View File

@ -4,14 +4,22 @@ describe 'Fog::AWS::EC2::Volume' do
describe "#initialize" do
it "should remap attributes from parser" # do
# volume = Fog::AWS::EC2::Address.new(
# 'instanceId' => 'i-00000000',
# 'publicIp' => '0.0.0.0'
# )
# address.instance_id.should == 'i-00000000'
# address.public_ip.should == '0.0.0.0'
# end
it "should remap attributes from parser" do
volume = Fog::AWS::EC2::Volume.new(
'attachmentTime' => 'now',
'availabilityZone' => 'us-east-1a',
'createTime' => 'recently',
'instanceId' => 'i-00000000',
'snapshotId' => 'snap-00000000',
'volumeId' => 'vol-00000000'
)
volume.attachment_time.should == 'now'
volume.availability_zone.should == 'us-east-1a'
volume.create_time.should == 'recently'
volume.instance_id.should == 'i-00000000'
volume.snapshot_id.should == 'snap-00000000'
volume.volume_id.should == 'vol-00000000'
end
end