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