Sha256: 2e7eebdab4c62b2822262f8f81b4323e0d56a4166be33575410289cb2d339094
Contents?: true
Size: 1.57 KB
Versions: 12
Compression:
Stored size: 1.57 KB
Contents
require 'spec_helper' describe 'Fog::AWS::Compute::Addresses' do describe "#all" do it "should return a Fog::AWS::Compute::Addresses" do AWS[:compute].addresses.all.should be_a(Fog::AWS::Compute::Addresses) end it "should include persisted addresses" do address = AWS[:compute].addresses.create AWS[:compute].addresses.get(address.public_ip).should_not be_nil address.destroy end end describe "#create" do before(:each) do @address = AWS[:compute].addresses.create end after(:each) do @address.destroy end it "should return a Fog::AWS::Compute::Address" do @address.should be_a(Fog::AWS::Compute::Address) end it "should exist on ec2" do AWS[:compute].addresses.get(@address.public_ip).should_not be_nil end end describe "#get" do it "should return a Fog::AWS::Compute::Address if a matching address exists" do address = AWS[:compute].addresses.create get = AWS[:compute].addresses.get(address.public_ip) address.attributes.should == get.attributes address.destroy end it "should return nil if no matching address exists" do AWS[:compute].addresses.get('0.0.0.0').should be_nil end end describe "#new" do it "should return a Fog::AWS::Compute::Address" do AWS[:compute].addresses.new.should be_a(Fog::AWS::Compute::Address) end end describe "#reload" do it "should return a Fog::AWS::Compute::Addresses" do AWS[:compute].addresses.all.reload.should be_a(Fog::AWS::Compute::Addresses) end end end
Version data entries
12 entries across 12 versions & 2 rubygems