Method: Awspec::Generator::Spec::NetworkInterface#generate_linespecs

Defined in:
lib/awspec/generator/spec/network_interface.rb

#generate_linespecs(interface) ⇒ Object



51
52
53
54
55
56
57
58
59
60
# File 'lib/awspec/generator/spec/network_interface.rb', line 51

def generate_linespecs(interface)
  linespecs = []
  interface.private_ip_addresses.each do |ip_address|
    line = "it { should have_private_ip_address('#{ip_address.private_ip_address}')"
    line += '.primary' if ip_address.primary
    line += ' }'
    linespecs.push(line)
  end
  linespecs
end