summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tc_byteback_snapshot.rb2
-rw-r--r--test/tc_restore.rb2
-rw-r--r--test/tc_restore_file.rb5
-rw-r--r--test/ts_byteback.rb3
4 files changed, 3 insertions, 9 deletions
diff --git a/test/tc_byteback_snapshot.rb b/test/tc_byteback_snapshot.rb
index 6101371..71f8c39 100644
--- a/test/tc_byteback_snapshot.rb
+++ b/test/tc_byteback_snapshot.rb
@@ -1,5 +1,3 @@
-$: << File.dirname(__FILE__)+"/../lib"
-
require 'test/unit'
require 'byteback/backup_directory'
require 'time'
diff --git a/test/tc_restore.rb b/test/tc_restore.rb
index 426c2b1..364c7f1 100644
--- a/test/tc_restore.rb
+++ b/test/tc_restore.rb
@@ -1,5 +1,3 @@
-$: << File.dirname(__FILE__)+"/../lib"
-
require 'test/unit'
require 'byteback/restore'
require 'tmpdir'
diff --git a/test/tc_restore_file.rb b/test/tc_restore_file.rb
index e9544f9..8284275 100644
--- a/test/tc_restore_file.rb
+++ b/test/tc_restore_file.rb
@@ -1,5 +1,3 @@
-$: << File.dirname(__FILE__)+"/../lib"
-
require 'test/unit'
require 'byteback/restore_file'
require 'tempfile'
@@ -20,8 +18,7 @@ class BytebackFileTest < Test::Unit::TestCase
end
def test_general
- f = Tempfile.new($0, @snapshot_path)
- puts f.path
+ f = Tempfile.new("restore-file-", @snapshot_path)
system("setfattr --name user.rsync.%stat -v \"41755 12,34 56:78\" #{f.path}")
b = Byteback::RestoreFile.new(f.path, @byteback_root)
assert_equal(041755, b.mode)
diff --git a/test/ts_byteback.rb b/test/ts_byteback.rb
index 63226a2..ccee796 100644
--- a/test/ts_byteback.rb
+++ b/test/ts_byteback.rb
@@ -1,5 +1,6 @@
-$: << "."
+$: << File.dirname(__FILE__)
+$: << File.dirname(__FILE__)+"/../lib"
require 'tc_restore.rb'
require 'tc_restore_file.rb'