58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/awspec/generator/spec/network_interface.rb', line 58
def network_interface_spec_template
template = <<-'EOF'
describe network_interface('<%= network_interface_id %>') do
it { should exist }
it { should be_<%= interface.status.tr('-', '_') %> }
<%- if instance_spec -%>
<%= instance_spec %>
<%- end -%>
it { should belong_to_vpc('<%= @vpc_tag_name %>') }
<%- if subnet_spec -%>
<%= subnet_spec %>
<%- end -%>
<% linespecs.each do |line| %>
<%= line %>
<% end %>
its(:private_ip_addresses_count) { should eq <%= interface.private_ip_addresses.count %> }
end
EOF
template
end
|