summaryrefslogtreecommitdiff
path: root/spec/unit/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-12-02 13:33:15 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-12-02 13:41:33 -0800
commit1b820fd008c469d336a2feb7871b15ec4b6750ae (patch)
tree0435ae6d2a81bf14c9bd9308645a9d54ee36c667 /spec/unit/provider
parent0f19729e1ec029edb17c68f1d5ac4fd472b18ee7 (diff)
downloadchef-1b820fd008c469d336a2feb7871b15ec4b6750ae.tar.gz
add unit test for a_to_s
Diffstat (limited to 'spec/unit/provider')
-rw-r--r--spec/unit/provider/package_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/provider/package_spec.rb b/spec/unit/provider/package_spec.rb
index d8f669e6a4..f77c2b5d0d 100644
--- a/spec/unit/provider/package_spec.rb
+++ b/spec/unit/provider/package_spec.rb
@@ -458,6 +458,10 @@ describe "Subclass with use_multipackage_api" do
expect(provider.use_multipackage_api?).to be true
end
+ it "offers a_to_s to subclasses to convert an array of strings to a single string" do
+ expect(provider.send(:a_to_s, "a", nil, "b", "", "c", " ", "d e", "f-g")).to eq("a b c d e f-g")
+ end
+
it "when user passes string to package_name, passes arrays to install_package" do
new_resource.package_name "vim"
new_resource.version nil