19
Puppet::Rails.teardown if Puppet[:dbadapter] != "sqlite3"
22
def railsresource(type = "file", title = "/tmp/testing", params = {})
26
# We need a host for resources
27
#host = Puppet::Rails::Host.new(:name => Facter.value("hostname"))
29
# Now build a resource
32
resources << mkresource(
33
:type => type, :title => title, :exported => true,
35
:parameters => params)
37
# Now collect our facts
38
facts = Facter.to_hash
40
# Now try storing our crap
42
node = mknode(facts["hostname"])
43
node.parameters = facts
44
assert_nothing_raised {
45
host = Puppet::Rails::Host.store(node, resources)
48
# Now save the whole thing