diff options
author | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2019-03-19 16:47:26 +0530 |
---|---|---|
committer | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2019-05-07 14:04:03 +0530 |
commit | 38c62c0c14794045154d886ffaf6f27778e659dd (patch) | |
tree | 0e563f420fce95ed1af6a7b21b187bc08e560647 /spec/unit/resource | |
parent | 66c0fdeb65c19d267bd501550e60cd16d7bb4901 (diff) | |
download | chef-38c62c0c14794045154d886ffaf6f27778e659dd.tar.gz |
Move response_file and response_file_variables out of base package resource
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Fix for Move response_file and response_file_variables out of base package resource
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
update require changes
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Updated require changes
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Fixed some unit test cases
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Diffstat (limited to 'spec/unit/resource')
-rw-r--r-- | spec/unit/resource/apt_package_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/resource/dpkg_package_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/resource/package_spec.rb | 10 |
3 files changed, 20 insertions, 10 deletions
diff --git a/spec/unit/resource/apt_package_spec.rb b/spec/unit/resource/apt_package_spec.rb index 66fe05ef33..c39c768ae2 100644 --- a/spec/unit/resource/apt_package_spec.rb +++ b/spec/unit/resource/apt_package_spec.rb @@ -53,4 +53,14 @@ describe Chef::Resource::AptPackage, "initialize" do it "should preserve configuration files by default" do expect(resource.overwrite_config_files).to eql(false) end + + it "accepts a string for the response file" do + resource.response_file "something" + expect(resource.response_file).to eql("something") + end + + it "accepts a hash for response file template variables" do + resource.response_file_variables({ variables: true }) + expect(resource.response_file_variables).to eql({ variables: true }) + end end diff --git a/spec/unit/resource/dpkg_package_spec.rb b/spec/unit/resource/dpkg_package_spec.rb index ff32d7e413..562dbeef76 100644 --- a/spec/unit/resource/dpkg_package_spec.rb +++ b/spec/unit/resource/dpkg_package_spec.rb @@ -36,6 +36,16 @@ describe Chef::Resource::DpkgPackage, "initialize" do expect(resource.action).to eql([:install]) end + it "accepts a string for the response file" do + resource.response_file "something" + expect(resource.response_file).to eql("something") + end + + it "accepts a hash for response file template variables" do + resource.response_file_variables({ variables: true }) + expect(resource.response_file_variables).to eql({ variables: true }) + end + it "supports :install, :lock, :purge, :reconfig, :remove, :unlock, :upgrade actions" do expect { resource.action :install }.not_to raise_error expect { resource.action :lock }.not_to raise_error diff --git a/spec/unit/resource/package_spec.rb b/spec/unit/resource/package_spec.rb index b0e1304775..6e3d609e4b 100644 --- a/spec/unit/resource/package_spec.rb +++ b/spec/unit/resource/package_spec.rb @@ -50,16 +50,6 @@ describe Chef::Resource::Package do expect(resource.version).to eql("something") end - it "accepts a string for the response file" do - resource.response_file "something" - expect(resource.response_file).to eql("something") - end - - it "accepts a hash for response file template variables" do - resource.response_file_variables({ variables: true }) - expect(resource.response_file_variables).to eql({ variables: true }) - end - it "accepts a string for the source" do resource.source "something" expect(resource.source).to eql("something") |