summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-12-17 18:05:58 -0600
committerLuke Kanies <luke@madstop.com>2008-12-18 11:10:24 -0600
commit89c25ad0661fbc1d57830f4648a3b108f4347278 (patch)
tree0ea2456487484e46718cca6af3d6df938774e2d9 /test
parent1c7f8f685d3beec267f7e45e7d1217d7db770082 (diff)
downloadpuppet-89c25ad0661fbc1d57830f4648a3b108f4347278.tar.gz
puppet-89c25ad0661fbc1d57830f4648a3b108f4347278.tar.xz
puppet-89c25ad0661fbc1d57830f4648a3b108f4347278.zip
Finishing the work to use Puppet::Resource instead of TransObject
This was a complicated project because TransObject had made its way into too many classes. The usage by Util::Settings was particularly nefarious. Refactoring and fixing this exposed some other issues. The main complication, though, was the extent to which the Puppet::Type class depended on TransObject. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/manager/attributes.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/ral/manager/attributes.rb b/test/ral/manager/attributes.rb
index e2a61f447..0fd712e51 100755
--- a/test/ral/manager/attributes.rb
+++ b/test/ral/manager/attributes.rb
@@ -139,41 +139,6 @@ class TestTypeAttributes < Test::Unit::TestCase
end
end
- def test_setdefaults
- type = mktype
- type.newparam(:name) {}
-
- # Make one of each param type
- {
- :meta2 => :newmetaparam, :param2 => :newparam, :prop2 => :newproperty
- }.each do |name, method|
- assert_nothing_raised("Could not make %s of type %s" % [name, method]) do
- type.send(method, name) do
- defaultto "testing"
- end
- end
- end
-
- inst = type.create(:name => 'yay')
- assert_nothing_raised do
- inst.setdefaults
- end
-
- [:meta2, :param2, :prop2].each do |name|
- assert(inst.value(name), "did not get a value for %s" % name)
- end
-
- # Try a default of "false"
- type.newparam(:falsetest) do
- defaultto false
- end
-
- assert_nothing_raised do
- inst.setdefaults
- end
- assert_equal(false, inst[:falsetest], "false default was not set")
- end
-
def test_alias_parameter
type = mktype
type.newparam(:name) {}