summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorshadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-15 20:26:40 +0000
committershadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-15 20:26:40 +0000
commit91991f186711251f20e1608815c49d360051c29a (patch)
tree0a0fab9db459b2d03f2dce89bcf15121d28a7b74 /test/language
parent0b5600a6b49400551b01cec7aa3286d42e45d36c (diff)
downloadpuppet-91991f186711251f20e1608815c49d360051c29a.tar.gz
puppet-91991f186711251f20e1608815c49d360051c29a.tar.xz
puppet-91991f186711251f20e1608815c49d360051c29a.zip
Merge fact_names & fact_values, and param_names & param_values.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2191 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/ast.rb2
-rwxr-xr-xtest/language/interpreter.rb4
-rwxr-xr-xtest/language/resource.rb9
3 files changed, 7 insertions, 8 deletions
diff --git a/test/language/ast.rb b/test/language/ast.rb
index 2fdba555c..0e4c6c31c 100755
--- a/test/language/ast.rb
+++ b/test/language/ast.rb
@@ -469,7 +469,7 @@ class TestAST < Test::Unit::TestCase
end
assert_nothing_raised("Could not find resource") do
retval = Puppet::Rails::Resource.find(:all,
- :include => :param_names,
+ :include => :params,
:conditions => str)
end
diff --git a/test/language/interpreter.rb b/test/language/interpreter.rb
index b74b15734..42c460fca 100755
--- a/test/language/interpreter.rb
+++ b/test/language/interpreter.rb
@@ -923,11 +923,11 @@ class TestInterpreter < Test::Unit::TestCase
assert(res, "Did not get resource from rails")
- param = res.param_names.find_by_name("owner", :include => :param_values)
+ param = res.params.find_by_name("owner")
assert(param, "Did not find owner param")
- pvalue = param.param_values.find_by_value("root")
+ pvalue = param.value
assert_equal("root", pvalue[:value])
end
end
diff --git a/test/language/resource.rb b/test/language/resource.rb
index a464e1791..ebf47e873 100755
--- a/test/language/resource.rb
+++ b/test/language/resource.rb
@@ -395,27 +395,26 @@ class TestResource < Test::Unit::TestCase
# Now make sure we can find it again
assert_nothing_raised do
obj = Puppet::Rails::Resource.find_by_restype_and_title(
- res.type, res.title, :include => :param_names
+ res.type, res.title, :include => :params
)
end
assert_instance_of(Puppet::Rails::Resource, obj)
# Make sure we get the parameters back
- params = options[:params] || [obj.param_names.collect { |p| p.name },
+ params = options[:params] || [obj.params.collect { |p| p.name },
res.to_hash.keys].flatten.collect { |n| n.to_s }.uniq
params.each do |name|
- param = obj.param_names.find_by_name(name)
+ param = obj.params.find_by_name(name)
if res[name]
assert(param, "resource did not keep %s" % name)
else
assert(! param, "resource did not delete %s" % name)
end
if param
- values = param.param_values.collect { |pv| pv.value }
should = res[param.name]
should = [should] unless should.is_a?(Array)
- assert_equal(should, values,
+ assert_equal(should, param.value,
"%s was different" % param.name)
end
end