summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-14 17:52:51 -0800
committerTim Smith <tsmith@chef.io>2017-12-15 08:16:29 -0800
commitbeff611b6f40e5bcb005a822b1e5c4a989e588ad (patch)
tree3504b74a88b8911137ecba19b03b4da061265e89
parentf47a13bf6384927df90194d852498a51aa694fe9 (diff)
downloadchef-beff611b6f40e5bcb005a822b1e5c4a989e588ad.tar.gz
Fix failing msu_package resource specs
Actions are arrays now Since we properly set source as a name property name gets coerced into a source path as expected. This was a bug before. This also uncovered #6674 which I'll fix in another PR. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/resource/msu_package_spec.rb8
-rw-r--r--spec/unit/resource/windows_task_spec.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/resource/msu_package_spec.rb b/spec/unit/resource/msu_package_spec.rb
index 349a382b31..66aacbc020 100644
--- a/spec/unit/resource/msu_package_spec.rb
+++ b/spec/unit/resource/msu_package_spec.rb
@@ -31,16 +31,16 @@ describe Chef::Resource::MsuPackage do
expect(resource.resource_name).to eql(:msu_package)
end
- it "sets the source as it's name" do
- expect(resource.source).to eql("test_pkg")
+ it "sets the source as its name and then coerces it to a path" do
+ expect(resource.source).to end_with("test_pkg")
end
it "sets the default action as :install" do
- expect(resource.action).to eql(:install)
+ expect(resource.action).to eql([:install])
end
it "raises error if invalid action is given" do
- expect { resource.action "abc" }.to raise_error(Chef::Exceptions::ValidationFailed)
+ expect { resource.action :abc }.to raise_error(Chef::Exceptions::ValidationFailed)
end
it "coerce its name to a package_name" do
diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb
index 131df524fc..fe0c55ecaf 100644
--- a/spec/unit/resource/windows_task_spec.rb
+++ b/spec/unit/resource/windows_task_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Resource::WindowsTask do
end
it "sets the default action as :create" do
- expect(resource.action).to eql(:create)
+ expect(resource.action).to eql([:create])
end
it "sets the default user as System" do