5 describe "the reject function" do
6 let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
9 expect(Puppet::Parser::Functions.function("reject")).to eq("function_reject")
12 it "should raise a ParseError if there is less than 1 arguments" do
13 expect { scope.function_reject([]) }.to( raise_error(Puppet::ParseError))
16 it "should reject contents from an array" do
17 result = scope.function_reject([["1111", "aaabbb","bbbccc","dddeee"], "bbb"])
18 expect(result).to(eq(["1111", "dddeee"]))