Method: Awspec::Generator::Spec::NetworkInterface#generate_subnet_spec

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

#generate_subnet_spec(interface) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/awspec/generator/spec/network_interface.rb', line 40

def generate_subnet_spec(interface)
  return unless interface.subnet_id

  subnet = find_subnet(interface.subnet_id)
  if subnet.tag_name
    "it { should belong_to_subnet('#{subnet.tag_name}') }"
  else
    "it { should belong_to_subnet('#{subnet.subnet_id}') }"
  end
end