diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:59:20 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-09 11:59:20 -0800 |
commit | 0f794c42243138b1b0cdcfa572ed805274562c68 (patch) | |
tree | ba93e12ac2f48a163a9a8c556600b2abcb5df35f /spec/unit/util | |
parent | a290f2e296e081dbd11bc4d930156256bffd1460 (diff) | |
download | chef-0f794c42243138b1b0cdcfa572ed805274562c68.tar.gz |
Added test to configuration_generator_spec to make sure multiple imports workjdm/dsc_script_imports
Diffstat (limited to 'spec/unit/util')
-rw-r--r-- | spec/unit/util/dsc/configuration_generator_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/util/dsc/configuration_generator_spec.rb b/spec/unit/util/dsc/configuration_generator_spec.rb index 80714a225d..9fbd3aaa51 100644 --- a/spec/unit/util/dsc/configuration_generator_spec.rb +++ b/spec/unit/util/dsc/configuration_generator_spec.rb @@ -182,6 +182,12 @@ describe Chef::Util::DSC::ConfigurationGenerator do dsc = conf_man.send(:configuration_code, 'archive{}', 'hello', {'FooModule' => ['FooResource', 'BarResource']}) expect(dsc).to match(/Import-DscResource -ModuleName FooModule -Name FooResource,BarResource/) end + + it "should import multiple modules with multiple import statements" do + dsc = conf_man.send(:configuration_code, 'archive{}', 'hello', {'FooModule' => ['FooResource', 'BarResource'], 'BazModule' => []}) + expect(dsc).to match(/Import-DscResource -ModuleName FooModule -Name FooResource,BarResource/) + expect(dsc).to match(/Import-DscResource -ModuleName BazModule\s*\n/) + end end end end |