summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-14 23:24:19 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-14 23:24:19 +0000
commit98ebb870d4da4efb0abcec52405c52bfff528cf0 (patch)
tree1c963a467bbffe19c783a760755290aa240b22dc /test
parent8714e14c10492361cac62726a3c1abe44d9ec23f (diff)
downloadpuppet-98ebb870d4da4efb0abcec52405c52bfff528cf0.tar.gz
puppet-98ebb870d4da4efb0abcec52405c52bfff528cf0.tar.xz
puppet-98ebb870d4da4efb0abcec52405c52bfff528cf0.zip
Moving the mount provider tests into a subdir, and fixing the basedir calculation in tests so it does not matter where the test is called from
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1926 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/lib/puppettest.rb17
-rwxr-xr-xtest/providers/mount/netinfo.rb (renamed from test/providers/netinfo_mount.rb)0
-rwxr-xr-xtest/providers/mount/parsed.rb (renamed from test/providers/parsedmount.rb)2
3 files changed, 3 insertions, 16 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 6e3d8cd4c..e83cc9a04 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -11,21 +11,8 @@ module PuppetTest
# the parent of that dir.
def basedir(*list)
unless defined? @@basedir
- case
- when $0 =~ /rake_test_loader/
- @@basedir = File.dirname(Dir.getwd)
- when ENV['BASEDIR']
- @@basedir = ENV['BASEDIR']
- else
- dir = nil
- app = $0.sub /^\.\//, ""
- if app =~ /^#{File::SEPARATOR}.+\.rb/
- dir = app
- else
- dir = File.join(Dir.getwd, app)
- end
- 3.times { dir = File.dirname(dir) }
- @@basedir = dir
+ Dir.chdir(File.dirname(__FILE__)) do
+ @@basedir = File.dirname(File.dirname(Dir.getwd))
end
end
if list.empty?
diff --git a/test/providers/netinfo_mount.rb b/test/providers/mount/netinfo.rb
index fcd814264..fcd814264 100755
--- a/test/providers/netinfo_mount.rb
+++ b/test/providers/mount/netinfo.rb
diff --git a/test/providers/parsedmount.rb b/test/providers/mount/parsed.rb
index 868dde617..e09218e6c 100755
--- a/test/providers/parsedmount.rb
+++ b/test/providers/mount/parsed.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-$:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
+$:.unshift("../../lib").unshift("../../../lib") if __FILE__ =~ /\.rb$/
require 'puppettest'
require 'puppettest/fileparsing'