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.0.5 spec/integration/type_spec.rb
puppet-6.0.5-x86-mingw32 spec/integration/type_spec.rb
puppet-6.0.5-x64-mingw32 spec/integration/type_spec.rb
puppet-6.0.5-universal-darwin spec/integration/type_spec.rb
puppet-5.5.10 spec/integration/type_spec.rb
puppet-5.5.10-x86-mingw32 spec/integration/type_spec.rb
puppet-5.5.10-x64-mingw32 spec/integration/type_spec.rb
puppet-5.5.10-universal-darwin spec/integration/type_spec.rb
puppet-6.1.0 spec/integration/type_spec.rb
puppet-6.1.0-x86-mingw32 spec/integration/type_spec.rb
puppet-6.1.0-x64-mingw32 spec/integration/type_spec.rb
puppet-6.1.0-universal-darwin spec/integration/type_spec.rb
puppet-6.0.4 spec/integration/type_spec.rb
puppet-6.0.4-x86-mingw32 spec/integration/type_spec.rb
puppet-6.0.4-x64-mingw32 spec/integration/type_spec.rb
puppet-6.0.4-universal-darwin spec/integration/type_spec.rb
puppet-5.5.8 spec/integration/type_spec.rb
puppet-5.5.8-x86-mingw32 spec/integration/type_spec.rb
puppet-5.5.8-x64-mingw32 spec/integration/type_spec.rb
puppet-5.5.8-universal-darwin spec/integration/type_spec.rb