diff options
| author | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-09 18:57:01 +0000 |
|---|---|---|
| committer | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-09 18:57:01 +0000 |
| commit | cf166c25911f521cdf12178ebbe0b39f81473b35 (patch) | |
| tree | 1a96094de1203cb3d48b6c07255414bea351092a /test/lib | |
| parent | 28c283c73388c3f76e1d715c41ebd82ac35ca9a4 (diff) | |
| download | puppet-cf166c25911f521cdf12178ebbe0b39f81473b35.tar.gz puppet-cf166c25911f521cdf12178ebbe0b39f81473b35.tar.xz puppet-cf166c25911f521cdf12178ebbe0b39f81473b35.zip | |
Rails stuff part 1
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1837 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/puppettest/railstesting.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/lib/puppettest/railstesting.rb b/test/lib/puppettest/railstesting.rb index 3a32d0c9e..e3b472b4f 100644 --- a/test/lib/puppettest/railstesting.rb +++ b/test/lib/puppettest/railstesting.rb @@ -14,16 +14,14 @@ module PuppetTest::RailsTesting host = Puppet::Rails::Host.new(:name => Facter.value("hostname")) # Now build a resource - resource = host.rails_resources.build( - :title => title, :restype => type, - :exported => true + resource = host.resources.build( + :title => title, :exported => true ) # Now add some params params.each do |param, value| - resource.rails_parameters.build( - :name => param, :value => value - ) + pvalue = ParamValue.new(:value => value) + resource.param_name.find_or_create_by_name(param).param_values << pvalue end # Now save the whole thing |
