summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Souter <p.souter@kainos.com>2014-12-04 14:12:55 +0000
committerPeter Souter <p.souter@kainos.com>2014-12-04 14:12:55 +0000
commited192a04648db7786d072bef23ed72849115d9de (patch)
treea7446e14b43d6642cf75d0629ee3de37b5b07ae9
parent4ebea40e08f20f3eaa36f9decc01be6353e3a804 (diff)
downloadpuppet-stdlib-ed192a04648db7786d072bef23ed72849115d9de.tar.gz
puppet-stdlib-ed192a04648db7786d072bef23ed72849115d9de.tar.bz2
(MODULES-444) Add specs for new behaviour
`concat` can now take multiple arguments
-rwxr-xr-xspec/functions/concat_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/functions/concat_spec.rb b/spec/functions/concat_spec.rb
index 49cb2ad..4a18cd9 100755
--- a/spec/functions/concat_spec.rb
+++ b/spec/functions/concat_spec.rb
@@ -32,4 +32,14 @@ describe "the concat function" do
result = scope.function_concat([array_original,['4','5','6']])
array_original.should(eq(['1','2','3']))
end
+
+ it "should be able to concat multiple arrays" do
+ result = scope.function_concat([['1','2','3'],['4','5','6'],['7','8','9']])
+ expect(result).to(eq(['1','2','3','4','5','6','7','8','9']))
+ end
+
+ it "should be able to concat mix of primitives and arrays to a final array" do
+ result = scope.function_concat([['1','2','3'],'4',['5','6','7']])
+ expect(result).to(eq(['1','2','3','4','5','6','7']))
+ end
end