summaryrefslogtreecommitdiffstats
path: root/test/ral/manager
diff options
context:
space:
mode:
authorballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-09 01:51:20 +0000
committerballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-09 01:51:20 +0000
commitc1643600e1130e2ddd112abcf16bb040fbffe0bf (patch)
tree73db9055495e529b0cac11ba8e81eb910db1e6a5 /test/ral/manager
parent8f187461a357898395ded25fb0c29a0d90a76896 (diff)
Merging of refactor-transacton to the trunk. This work removes the :is attribute from properties and relies on the provider to cache or return the current value of the property.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2487 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/ral/manager')
-rwxr-xr-xtest/ral/manager/attributes.rb16
-rwxr-xr-xtest/ral/manager/type.rb4
2 files changed, 7 insertions, 13 deletions
diff --git a/test/ral/manager/attributes.rb b/test/ral/manager/attributes.rb
index 43f716ec2..9826638ee 100755
--- a/test/ral/manager/attributes.rb
+++ b/test/ral/manager/attributes.rb
@@ -42,19 +42,14 @@ class TestTypeAttributes < Test::Unit::TestCase
if param == :property
assert(inst.property(param), "did not get obj for %s" % param)
- end
-
- if param == :property
assert_equal(true, inst.should(param),
"should value did not get set")
- inst.is = [:property, true]
+ else
+ assert_equal(true, inst[param],
+ "did not get correct value for %s from symbol" % param)
+ assert_equal(true, inst[param.to_s],
+ "did not get correct value for %s from string" % param)
end
-
- # Now make sure we can get it back
- assert_equal(true, inst[param],
- "did not get correct value for %s from symbol" % param)
- assert_equal(true, inst[param.to_s],
- "did not get correct value for %s from string" % param)
end
end
@@ -232,7 +227,6 @@ class TestTypeAttributes < Test::Unit::TestCase
type.provide(:testing) {}
provider = type.attrclass(:provider)
should = [[name, :param], [provider, :param], [two, :property], [one, :param]]
-
assert_nothing_raised do
result = nil
type.eachattr do |obj, name|
diff --git a/test/ral/manager/type.rb b/test/ral/manager/type.rb
index 6c1d6156c..3872ef637 100755
--- a/test/ral/manager/type.rb
+++ b/test/ral/manager/type.rb
@@ -452,7 +452,7 @@ end
ret = inst.retrieve
}
- assert_equal(:noopts, inst.is)
+ assert_equal(:noopts, inst.retrieve)
# Now create a property with a different way of doing it
property = nil
@@ -468,7 +468,7 @@ end
ret = inst.retrieve
}
- assert_equal(:yayness, inst.is)
+ assert_equal(:yayness, ret)
end
def test_name_vs_title