Sha256: 7d02a2e8c20b1403d7bd7f5b996e283bf48435b509530af8e210285fb54774af
Contents?: true
Size: 791 Bytes
Versions: 51
Compression:
Stored size: 791 Bytes
Contents
require 'spec_helper' describe CfnDsl::ResourceDefinition do subject { CfnDsl::CloudFormationTemplate.new.AutoScalingGroup(:web_servers) } context '#addTag' do it 'is a pass-through method to add_tag' do expect(subject).to receive(:add_tag).with('role', 'web-server', true) subject.addTag('role', 'web-server', true) end end context '#add_tag' do it 'adds a Tag for the resource' do subject.add_tag('role', 'web-server', true) tags = subject.Property(:Tags).value expect(tags).to be_an(Array) tag = tags.pop expect(tag.instance_variable_get('@Key')).to eq('role') expect(tag.instance_variable_get('@Value')).to eq('web-server') expect(tag.instance_variable_get('@PropagateAtLaunch')).to eq(true) end end end
Version data entries
51 entries across 51 versions & 1 rubygems