1
# $Id: fileasserts.rb 11708 2007-02-12 23:01:19Z shyouhei $
5
module Assertions # redefine
7
def assert_same_file(from, to)
9
assert_block("file #{from} != #{to}") {
10
File.read(from) == File.read(to)
15
def assert_same_entry(from, to)
18
assert_equal a.mode, b.mode, "mode #{a.mode} != #{b.mode}"
19
#assert_equal a.atime, b.atime
20
assert_equal a.mtime, b.mtime, "mtime #{a.mtime} != #{b.mtime}"
21
assert_equal a.uid, b.uid, "uid #{a.uid} != #{b.uid}"
22
assert_equal a.gid, b.gid, "gid #{a.gid} != #{b.gid}"
25
def assert_file_exist(path)
27
assert_block("file not exist: #{path}") {
33
def assert_file_not_exist(path)
35
assert_block("file not exist: #{path}") {
41
def assert_directory(path)
43
assert_block("is not directory: #{path}") {
49
def assert_symlink(path)
51
assert_block("is not a symlink: #{path}") {
57
def assert_not_symlink(path)
59
assert_block("is a symlink: #{path}") {
60
not File.symlink?(path)