diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:08:33 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:08:33 -0800 |
commit | efeb9452b2d9051846def74a4dd9ff3f74a826aa (patch) | |
tree | 000857da2738064b69d80c2da8a040e3bb49944e /spec | |
parent | 8f8f018b3f5275ef900eea18a8f9b15dd724053e (diff) | |
download | chef-efeb9452b2d9051846def74a4dd9ff3f74a826aa.tar.gz |
Added spec to make sure dsc_script imports can have multiple modules
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/dsc_script_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/dsc_script_spec.rb b/spec/unit/resource/dsc_script_spec.rb index 861bc9151a..57d5d32ad6 100644 --- a/spec/unit/resource/dsc_script_spec.rb +++ b/spec/unit/resource/dsc_script_spec.rb @@ -72,6 +72,7 @@ describe Chef::Resource::DscScript do context "when calling imports" do let(:module_name) { 'FooModule' } + let(:module_name_b) { 'BarModule' } let(:dsc_resources) { ['ResourceA', 'ResourceB'] } it "allows an arbitrary number of resources to be set for a module to be set" do @@ -85,6 +86,13 @@ describe Chef::Resource::DscScript do module_imports = dsc_test_resource.imports[module_name] expect(module_imports).to eq(['*']) end + + it "allows an arbitrary number of modules" do + dsc_test_resource.imports module_name + dsc_test_resource.imports module_name_b + expect(dsc_test_resource.imports).to have_key(module_name) + expect(dsc_test_resource.imports).to have_key(module_name_b) + 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 |