diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:12:32 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:12:32 -0800 |
commit | a290f2e296e081dbd11bc4d930156256bffd1460 (patch) | |
tree | 42ebaf7b445ab0c8996308f6710adc3ba487829b /spec | |
parent | efeb9452b2d9051846def74a4dd9ff3f74a826aa (diff) | |
download | chef-a290f2e296e081dbd11bc4d930156256bffd1460.tar.gz |
Added spec to make sure a resource can be added to an existing moudle import for dsc_script imports
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/dsc_script_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/resource/dsc_script_spec.rb b/spec/unit/resource/dsc_script_spec.rb index 57d5d32ad6..71103ea590 100644 --- a/spec/unit/resource/dsc_script_spec.rb +++ b/spec/unit/resource/dsc_script_spec.rb @@ -93,6 +93,13 @@ describe Chef::Resource::DscScript do expect(dsc_test_resource.imports).to have_key(module_name) expect(dsc_test_resource.imports).to have_key(module_name_b) end + + it "allows resources to be added for a module" do + dsc_test_resource.imports module_name, dsc_resources[0] + dsc_test_resource.imports module_name, dsc_resources[1] + module_imports = dsc_test_resource.imports[module_name] + expect(module_imports).to eq(dsc_resources) + end end it "raises an ArgumentError exception if an attempt is made to set the code attribute when the command attribute is already set" do |