From 3891f48119ea01d04d7495cf2f07a9ddb37b2afc Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 19 Sep 2006 18:04:20 +0000 Subject: Converting to using the Rakefile for testing. The old 'test' script is now deprecated, and I'll send an email to the dev list and update the docs to reflect that. This still isn't the final solution, because the module structure is a bit weird, but at least it's a starting point, and everything from here on out is small changes, as opposed to large architectural changes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1632 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/executables/puppetmodule.rb | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'test/executables/puppetmodule.rb') diff --git a/test/executables/puppetmodule.rb b/test/executables/puppetmodule.rb index cff43a0e5..0752fed14 100755 --- a/test/executables/puppetmodule.rb +++ b/test/executables/puppetmodule.rb @@ -1,22 +1,19 @@ -if __FILE__ == $0 - $:.unshift '../../lib' - $:.unshift '..' - $puppetbase = "../.." -end - require 'puppet' require 'puppet/server' require 'puppet/sslcertificates' -require 'test/unit' -require 'puppettest.rb' - -$module = File.join($puppetbase, "ext", "module_puppet") +require 'puppettest' class TestPuppetModule < Test::Unit::TestCase - include ExeTest + include PuppetTest::ExeTest + + + def setup + super + @module = File.join(basedir, "ext", "module_puppet") + end def test_existence - assert(FileTest.exists?($module), "Module does not exist") + assert(FileTest.exists?(@module), "Module does not exist") end def test_execution @@ -29,7 +26,7 @@ class TestPuppetModule < Test::Unit::TestCase } output = nil - cmd = $module + cmd = @module cmd += " --verbose" #cmd += " --fqdn %s" % fqdn cmd += " --confdir %s" % Puppet[:confdir] -- cgit