1 #! /usr/bin/env ruby -S rspec
4 describe "the join function" do
5 let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
8 expect(Puppet::Parser::Functions.function("join")).to eq("function_join")
11 it "should raise a ParseError if there is less than 1 arguments" do
12 expect { scope.function_join([]) }.to( raise_error(Puppet::ParseError))
15 it "should join an array into a string" do
16 result = scope.function_join([["a","b","c"], ":"])
17 expect(result).to(eq("a:b:c"))