Sha256: e9cd8f514a07e9cdc98af4e140d97d6c42d790728181e494a3d63b198e9bb32e

Contents?: true

Size: 1.53 KB

Versions: 102

Compression:

Stored size: 1.53 KB

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe 'Fog::AWS::EC2::Addresses' do

  describe "#all" do

    it "should return a Fog::AWS::EC2::Addresses" do
      AWS[:ec2].addresses.all.should be_a(Fog::AWS::EC2::Addresses)
    end

    it "should include persisted addresses" do
      address = AWS[:ec2].addresses.create
      AWS[:ec2].addresses.get(address.public_ip).should_not be_nil
      address.destroy
    end

  end

  describe "#create" do

    before(:each) do
      @address = AWS[:ec2].addresses.create
    end

    after(:each) do
      @address.destroy
    end

    it "should return a Fog::AWS::EC2::Address" do
      @address.should be_a(Fog::AWS::EC2::Address)
    end

    it "should exist on ec2" do
      AWS[:ec2].addresses.get(@address.public_ip).should_not be_nil
    end

  end

  describe "#get" do

    it "should return a Fog::AWS::EC2::Address if a matching address exists" do
      address = AWS[:ec2].addresses.create
      get = AWS[:ec2].addresses.get(address.public_ip)
      address.attributes.should == get.attributes
      address.destroy
    end

    it "should return nil if no matching address exists" do
      AWS[:ec2].addresses.get('0.0.0.0').should be_nil
    end

  end

  describe "#new" do

    it "should return a Fog::AWS::EC2::Address" do
      AWS[:ec2].addresses.new.should be_a(Fog::AWS::EC2::Address)
    end

  end

  describe "#reload" do

    it "should return a Fog::AWS::EC2::Addresses" do
      AWS[:ec2].addresses.all.reload.should be_a(Fog::AWS::EC2::Addresses)
    end

  end

end

Version data entries

102 entries across 102 versions & 2 rubygems

Version Path
fog-0.2.30 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.28 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.27 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.26 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.25 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.24 spec/aws/models/ec2/addresses_spec.rb
tecnh-fog-0.2.23.vpc spec/aws/models/ec2/addresses_spec.rb
fog-0.2.23 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.22 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.21 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.20 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.19 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.18 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.17 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.16 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.15 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.14 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.13 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.12 spec/aws/models/ec2/addresses_spec.rb
fog-0.2.11 spec/aws/models/ec2/addresses_spec.rb