SaltwaterC / serverspec-aws

Serverspec resources for AWS
Other
12 stars 9 forks source link

Make subnets iterable #4

Closed temyers closed 8 years ago

temyers commented 8 years ago

Extended the subnets resource to make it iterable so the following is possible:

describe subnets = vpc.subnets do
    subnets.each do |subnet|
      describe subnet do
        its(:availability_zone) { should start_with 'us-east-1' }
      end
    end
  end
SaltwaterC commented 8 years ago

Had to add a require 'forwardable', otherwise it fails with:

$ rake test
rake aborted!
NameError: uninitialized constant Serverspec::Type::AWS::EC2::Subnets::Forwardable
[snip]

This happens with Ruby 2.1.6. Still at this version as I'm using ChefDK as development environment for all my Ruby code.

SaltwaterC commented 8 years ago

Pushed v0.1.1 to Rubygems.