From 7bd6a2f37beda001c83b666900df436a33cfccb1 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Thu, 21 Apr 2011 11:10:44 -0700 Subject: maint: Remove unused code While looking through code related to dealing with teardown on class state variables we found some code that was never called in the unit tests. Paired-with: Josh Cooper --- test/lib/puppettest/railstesting.rb | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'test/lib') diff --git a/test/lib/puppettest/railstesting.rb b/test/lib/puppettest/railstesting.rb index e05511e3b..f5666f2c4 100644 --- a/test/lib/puppettest/railstesting.rb +++ b/test/lib/puppettest/railstesting.rb @@ -14,39 +14,5 @@ module PuppetTest::RailsTesting def railsinit Puppet::Rails.init end - - def railsteardown - Puppet::Rails.teardown if Puppet[:dbadapter] != "sqlite3" - end - - def railsresource(type = "file", title = "/tmp/testing", params = {}) - railsteardown - railsinit - - # We need a host for resources - #host = Puppet::Rails::Host.new(:name => Facter.value("hostname")) - - # Now build a resource - resources = [] - - resources << mkresource( - :type => type, :title => title, :exported => true, - - :parameters => params) - - # Now collect our facts - facts = Facter.to_hash - - # Now try storing our crap - host = nil - node = mknode(facts["hostname"]) - node.parameters = facts - assert_nothing_raised { - host = Puppet::Rails::Host.store(node, resources) - } - - # Now save the whole thing - host.save - end end -- cgit