summaryrefslogtreecommitdiffstats
path: root/test/rails/railsresource.rb
diff options
context:
space:
mode:
authorshadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-17 01:52:59 +0000
committershadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2007-02-17 01:52:59 +0000
commit8b18fdfe1ad86fd28732e3bbe243459a4f00c74c (patch)
tree8f3c5bd5349aa7caecc7ba004379cab69b558012 /test/rails/railsresource.rb
parent9fe8905abf99c7683d4ac0ce111f567d83f22b54 (diff)
downloadpuppet-8b18fdfe1ad86fd28732e3bbe243459a4f00c74c.tar.gz
puppet-8b18fdfe1ad86fd28732e3bbe243459a4f00c74c.tar.xz
puppet-8b18fdfe1ad86fd28732e3bbe243459a4f00c74c.zip
Undo the params & facts stuff
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2206 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/rails/railsresource.rb')
-rwxr-xr-xtest/rails/railsresource.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/rails/railsresource.rb b/test/rails/railsresource.rb
index f3cdc22a6..302dd99fb 100755
--- a/test/rails/railsresource.rb
+++ b/test/rails/railsresource.rb
@@ -36,8 +36,9 @@ class TestRailsResource < Test::Unit::TestCase
# Now add some params
params.each do |param, value|
- pn = resource.params.find_or_create_by_name_and_value(param, value)
- resource.params << pn
+ pn = resource.param_names.find_or_create_by_name(param)
+ pv = pn.param_values.find_or_create_by_value(value)
+ resource.param_names << pn
end
host.save
@@ -57,7 +58,7 @@ class TestRailsResource < Test::Unit::TestCase
interp, scope, source = mkclassframing
# Find the new resource and include all it's parameters.
- resource = Puppet::Rails::Resource.find_by_id(resource.id, :include => [ :params ])
+ resource = Puppet::Rails::Resource.find_by_id(resource.id, :include => [ :param_names, :param_values ])
# Now, try to convert our resource to a real resource
res = nil