Sha256: 776fb9cababa5a85a0d750ba291d624d52647274db8724f5420312779115acf9

Contents?: true

Size: 722 Bytes

Versions: 35

Compression:

Stored size: 722 Bytes

Contents

#!/usr/bin/env ruby

require File.expand_path(File.dirname(__FILE__) + '/../../lib/puppettest')

require 'puppettest'
require 'puppet/provider/nameservice'
require 'facter'

class TestNameServiceProvider < Test::Unit::TestCase
  include PuppetTest::FileTesting

  def test_option
    klass = Class.new(Puppet::Provider::NameService)
    klass.resource_type = Puppet::Type.type(:user)

    val = nil
    assert_nothing_raised {
      val = klass.option(:home, :flag)
    }

    assert_nil(val, "Got an option")

    assert_nothing_raised {
      klass.options :home, :flag => "-d"
    }
    assert_nothing_raised {
      val = klass.option(:home, :flag)
    }
    assert_equal("-d", val, "Got incorrect option")
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
puppet-2.7.26 test/ral/providers/nameservice.rb
puppet-2.7.25 test/ral/providers/nameservice.rb
puppet-2.7.24 test/ral/providers/nameservice.rb
puppet-2.7.23 test/ral/providers/nameservice.rb
puppet-2.7.22 test/ral/providers/nameservice.rb
puppet-2.7.21 test/ral/providers/nameservice.rb
puppet-2.7.20 test/ral/providers/nameservice.rb
puppet-2.7.20.rc1 test/ral/providers/nameservice.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/test/ral/providers/nameservice.rb
puppet-2.7.19 test/ral/providers/nameservice.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/test/ral/providers/nameservice.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/test/ral/providers/nameservice.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/test/ral/providers/nameservice.rb
puppet-2.7.18 test/ral/providers/nameservice.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/test/ral/providers/nameservice.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/test/ral/providers/nameservice.rb
puppet-2.7.17 test/ral/providers/nameservice.rb
puppet-2.7.16 test/ral/providers/nameservice.rb
puppet-2.7.14 test/ral/providers/nameservice.rb
puppet-2.7.13 test/ral/providers/nameservice.rb