Sha256: 96c4209f176ffeec5e60db9d30efce55ce02b5c45e6639909d47e1731321eb76

Contents?: true

Size: 772 Bytes

Versions: 16

Compression:

Stored size: 772 Bytes

Contents

#!/usr/bin/env ruby

require 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

16 entries across 16 versions & 1 rubygems

Version Path
puppet-0.25.5 test/ral/providers/nameservice.rb
puppet-0.25.4 test/ral/providers/nameservice.rb
puppet-0.25.3 test/ral/providers/nameservice.rb
puppet-0.24.9 test/ral/providers/nameservice.rb
puppet-0.25.2 test/ral/providers/nameservice.rb
puppet-0.25.1 test/ral/providers/nameservice.rb
puppet-0.25.0 test/ral/providers/nameservice.rb
puppet-0.24.0 test/ral/providers/nameservice.rb
puppet-0.24.2 test/ral/providers/nameservice.rb
puppet-0.24.1 test/ral/providers/nameservice.rb
puppet-0.24.4 test/ral/providers/nameservice.rb
puppet-0.24.3 test/ral/providers/nameservice.rb
puppet-0.24.5 test/ral/providers/nameservice.rb
puppet-0.24.6 test/ral/providers/nameservice.rb
puppet-0.24.7 test/ral/providers/nameservice.rb
puppet-0.24.8 test/ral/providers/nameservice.rb