Sha256: 534560785679e7b1198ea01fc1a0e93c3285d86cffd5d2edecca1ac307d24937

Contents?: true

Size: 597 Bytes

Versions: 160

Compression:

Stored size: 597 Bytes

Contents

#! /usr/bin/env ruby
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

160 entries across 160 versions & 1 rubygems

Version Path
puppet-5.5.12 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.12-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.12-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.12-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.10 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.10-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.10-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.10-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.8 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.8-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.8-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.8-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.7 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.7-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.7-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.7-universal-darwin spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.6 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.6-x86-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.6-x64-mingw32 spec/unit/parser/functions/regsubst_spec.rb
puppet-5.5.6-universal-darwin spec/unit/parser/functions/regsubst_spec.rb