Sha256: b76f5b9bb7a18a0ae03ab5904a3f1c50d4a2e22b97baa5667b7720f1cd4894db

Contents?: true

Size: 719 Bytes

Versions: 340

Compression:

Stored size: 719 Bytes

Contents

require 'spec_helper'

require 'puppet/type'

describe Puppet::Type do
  it "should not lose its provider list when it is reloaded" do
    type = Puppet::Type.newtype(:integration_test) do
      newparam(:name) {}
    end

    provider = type.provide(:myprovider) {}

    # reload it
    type = Puppet::Type.newtype(:integration_test) do
      newparam(:name) {}
    end

    expect(type.provider(:myprovider)).to equal(provider)
  end

  it "should not lose its provider parameter when it is reloaded" do
    type = Puppet::Type.newtype(:reload_test_type)
    type.provide(:test_provider)

    # reload it
    type = Puppet::Type.newtype(:reload_test_type)

    expect(type.parameters).to include(:provider)
  end
end

Version data entries

340 entries across 340 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/integration/type_spec.rb
puppet-8.3.0-x86-mingw32 spec/integration/type_spec.rb
puppet-8.3.0-x64-mingw32 spec/integration/type_spec.rb
puppet-8.3.0-universal-darwin spec/integration/type_spec.rb
puppet-8.4.0 spec/integration/type_spec.rb
puppet-8.4.0-x86-mingw32 spec/integration/type_spec.rb
puppet-8.4.0-x64-mingw32 spec/integration/type_spec.rb
puppet-8.4.0-universal-darwin spec/integration/type_spec.rb
puppet-7.28.0 spec/integration/type_spec.rb
puppet-7.28.0-x86-mingw32 spec/integration/type_spec.rb
puppet-7.28.0-x64-mingw32 spec/integration/type_spec.rb
puppet-7.28.0-universal-darwin spec/integration/type_spec.rb
puppet-8.3.1 spec/integration/type_spec.rb
puppet-8.3.1-x86-mingw32 spec/integration/type_spec.rb
puppet-8.3.1-x64-mingw32 spec/integration/type_spec.rb
puppet-8.3.1-universal-darwin spec/integration/type_spec.rb
puppet-7.27.0 spec/integration/type_spec.rb
puppet-7.27.0-x86-mingw32 spec/integration/type_spec.rb
puppet-7.27.0-x64-mingw32 spec/integration/type_spec.rb
puppet-7.27.0-universal-darwin spec/integration/type_spec.rb