Sha256: d1aaacc6f7d209426f3401d02aa125ee5c4a4fb08cb99bb54e1d7cc58005ef18

Contents?: true

Size: 740 Bytes

Versions: 80

Compression:

Stored size: 740 Bytes

Contents

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

80 entries across 80 versions & 1 rubygems

Version Path
puppet-6.4.0 spec/integration/type_spec.rb
puppet-6.4.0-x86-mingw32 spec/integration/type_spec.rb
puppet-6.4.0-x64-mingw32 spec/integration/type_spec.rb
puppet-6.4.0-universal-darwin spec/integration/type_spec.rb
puppet-6.0.7 spec/integration/type_spec.rb
puppet-6.0.7-x86-mingw32 spec/integration/type_spec.rb
puppet-6.0.7-x64-mingw32 spec/integration/type_spec.rb
puppet-6.0.7-universal-darwin spec/integration/type_spec.rb
puppet-5.5.12 spec/integration/type_spec.rb
puppet-5.5.12-x86-mingw32 spec/integration/type_spec.rb
puppet-5.5.12-x64-mingw32 spec/integration/type_spec.rb
puppet-5.5.12-universal-darwin spec/integration/type_spec.rb
puppet-6.3.0 spec/integration/type_spec.rb
puppet-6.3.0-x86-mingw32 spec/integration/type_spec.rb
puppet-6.3.0-x64-mingw32 spec/integration/type_spec.rb
puppet-6.3.0-universal-darwin spec/integration/type_spec.rb
puppet-6.2.0 spec/integration/type_spec.rb
puppet-6.2.0-x86-mingw32 spec/integration/type_spec.rb
puppet-6.2.0-x64-mingw32 spec/integration/type_spec.rb
puppet-6.2.0-universal-darwin spec/integration/type_spec.rb