diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2017-01-31 12:12:23 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2017-01-31 12:12:23 +0000 |
commit | 659a651aa294c335e519b4c72bbd052b3199a793 (patch) | |
tree | a36a95dd652717624034c553bf18c7d66156ccf5 /test/tc_restore_file.rb | |
parent | 38c89a9e32a67f96b40d756a5c356f8c31247ab9 (diff) |
First pass with rubocoprubocop
Diffstat (limited to 'test/tc_restore_file.rb')
-rw-r--r-- | test/tc_restore_file.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/tc_restore_file.rb b/test/tc_restore_file.rb index 8284275..9c12635 100644 --- a/test/tc_restore_file.rb +++ b/test/tc_restore_file.rb @@ -4,12 +4,11 @@ require 'tempfile' require 'tmpdir' class BytebackFileTest < Test::Unit::TestCase - def setup @byteback_root = Dir.mktmpdir now = Time.now @snapshot = Time.local(now.year, now.month, now.day, now.hour, now.min) - @snapshot_path = File.join(@byteback_root, @snapshot.strftime("%Y-%m-%dT%H:%M%z")) + @snapshot_path = File.join(@byteback_root, @snapshot.strftime('%Y-%m-%dT%H:%M%z')) FileUtils.mkdir_p(@snapshot_path) end @@ -18,7 +17,7 @@ class BytebackFileTest < Test::Unit::TestCase end def test_general - f = Tempfile.new("restore-file-", @snapshot_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) @@ -26,9 +25,8 @@ class BytebackFileTest < Test::Unit::TestCase assert_equal(34, b.dev_minor) assert_equal(56, b.uid) assert_equal(78, b.gid) - assert_equal("drwxr-xr-t", b.modestring) + assert_equal('drwxr-xr-t', b.modestring) assert_equal(@snapshot, b.snapshot_time) assert_kind_of(Time, f.mtime) end - end |