Sha256: d8c22dd7c4b1040be750be30b9531b91919cee4c6e14480e1b09c182797bc880

Contents?: true

Size: 665 Bytes

Versions: 20

Compression:

Stored size: 665 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'

describe "the 'tagged' 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 exist" do
    expect(Puppet::Parser::Functions.function(:tagged)).to eq("function_tagged")
  end

  it 'is not available when --tasks is on' do
    Puppet[:tasks] = true
    expect do
      @scope.function_tagged(['one', 'two'])
    end.to raise_error(Puppet::ParseError, /is only available when compiling a catalog/)
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-5.5.3 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.3-x86-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.3-x64-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.3-universal-darwin spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.2 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.2-x86-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.2-x64-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.2-universal-darwin spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.1 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.1-x86-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.1-x64-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.1-universal-darwin spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.0 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.0-x86-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.0-x64-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.5.0-universal-darwin spec/unit/parser/functions/tagged_spec.rb
puppet-5.4.0 spec/unit/parser/functions/tagged_spec.rb
puppet-5.4.0-x86-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.4.0-x64-mingw32 spec/unit/parser/functions/tagged_spec.rb
puppet-5.4.0-universal-darwin spec/unit/parser/functions/tagged_spec.rb