Sha256: dd1e6939653bb4536e66771d4af029276cc0ada4fcd4b1d779785c3e1f4c580e

Contents?: true

Size: 576 Bytes

Versions: 36

Compression:

Stored size: 576 Bytes

Contents

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

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
puppet-5.5.22 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.22-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.22-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.22-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.21 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.21-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.21-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.21-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.20 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.20-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.20-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.20-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.19 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.19-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.19-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.19-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.18 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.18-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.18-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.18-universal-darwin spec/unit/parser/functions/regsubst_spec.rb