1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
require 'spec_helper'
describe "the regsubst function" do
before :all do
Puppet::Parser::Functions.autoloader.loadall
end
before :each do
node = Puppet::Node.new('localhost')
compiler = Puppet::Parser::Compiler.new(node)
@scope = Puppet::Parser::Scope.new(compiler)
end
it 'should raise an ParseError' do
expect do
@scope.function_regsubst(
[ 'the monkey breaks banana trees',
'b[an]*a',
'coconut'
])
end.to raise_error(Puppet::ParseError, /can only be called using the 4.x function API/)
end
end
|