Sha256: a618257df908a9cba5aca41ae9906fc7a9372b077a20f04fc6972b3509bb6d91

Contents?: true

Size: 773 Bytes

Versions: 10

Compression:

Stored size: 773 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../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

    type.provider(:myprovider).should equal(provider)
  end

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

    provider = type.provide(:test_provider)

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

    type.parameters.should include(:provider)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/integration/type_spec.rb
puppet-2.6.17 spec/integration/type_spec.rb
puppet-2.6.16 spec/integration/type_spec.rb
puppet-2.6.15 spec/integration/type_spec.rb
puppet-2.6.14 spec/integration/type_spec.rb
puppet-2.6.13 spec/integration/type_spec.rb
puppet-2.6.12 spec/integration/type_spec.rb
puppet-2.6.11 spec/integration/type_spec.rb
puppet-2.6.10 spec/integration/type_spec.rb
puppet-2.6.9 spec/integration/type_spec.rb