diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-14 23:24:19 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-14 23:24:19 +0000 |
| commit | 98ebb870d4da4efb0abcec52405c52bfff528cf0 (patch) | |
| tree | 1c963a467bbffe19c783a760755290aa240b22dc /test/lib | |
| parent | 8714e14c10492361cac62726a3c1abe44d9ec23f (diff) | |
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/lib')
| -rwxr-xr-x | test/lib/puppettest.rb | 17 |
1 files changed, 2 insertions, 15 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? |
