@@ -24,7 +24,7 @@ def test_can_create_directories
24
24
FileUtils . mkdir_p ( "/path/to/dir" )
25
25
assert_kind_of FakeDir , FileSystem . fs [ 'path' ] [ 'to' ] [ 'dir' ]
26
26
end
27
-
27
+
28
28
def test_can_create_directories_with_mkpath
29
29
FileUtils . mkpath ( "/path/to/dir" )
30
30
assert_kind_of FakeDir , FileSystem . fs [ 'path' ] [ 'to' ] [ 'dir' ]
@@ -74,14 +74,14 @@ def test_can_create_symlinks
74
74
FileUtils . ln_s ( target , '/path/to/link' )
75
75
end
76
76
end
77
-
77
+
78
78
def test_can_force_creation_of_symlinks
79
79
FileUtils . mkdir_p ( target = "/path/to/first/target" )
80
80
FileUtils . ln_s ( target , "/path/to/link" )
81
81
assert_kind_of FakeSymlink , FileSystem . fs [ 'path' ] [ 'to' ] [ 'link' ]
82
82
FileUtils . ln_s ( target , '/path/to/link' , :force => true )
83
83
end
84
-
84
+
85
85
def test_create_symlink_using_ln_sf
86
86
FileUtils . mkdir_p ( target = "/path/to/first/target" )
87
87
FileUtils . ln_s ( target , "/path/to/link" )
@@ -1126,38 +1126,38 @@ def test_directory_open_block
1126
1126
def test_tmpdir
1127
1127
assert Dir . tmpdir == "/tmp"
1128
1128
end
1129
-
1129
+
1130
1130
def test_hard_link_creates_file
1131
1131
FileUtils . touch ( "/foo" )
1132
-
1132
+
1133
1133
File . link ( "/foo" , "/bar" )
1134
1134
assert File . exists? ( "/bar" )
1135
1135
end
1136
-
1136
+
1137
1137
def test_hard_link_with_missing_file_raises_error
1138
1138
assert_raises ( Errno ::ENOENT ) do
1139
1139
File . link ( "/foo" , "/bar" )
1140
1140
end
1141
1141
end
1142
-
1142
+
1143
1143
def test_hard_link_with_existing_destination_file
1144
1144
FileUtils . touch ( "/foo" )
1145
1145
FileUtils . touch ( "/bar" )
1146
-
1146
+
1147
1147
assert_raises ( Errno ::EEXIST ) do
1148
1148
File . link ( "/foo" , "/bar" )
1149
1149
end
1150
1150
end
1151
-
1151
+
1152
1152
def test_hard_link_returns_0_when_successful
1153
1153
FileUtils . touch ( "/foo" )
1154
-
1154
+
1155
1155
assert_equal 0 , File . link ( "/foo" , "/bar" )
1156
1156
end
1157
-
1157
+
1158
1158
def test_hard_link_returns_duplicate_file
1159
1159
File . open ( "/foo" , "w" ) { |x | x << "some content" }
1160
-
1160
+
1161
1161
File . link ( "/foo" , "/bar" )
1162
1162
assert_equal "some content" , File . read ( "/bar" )
1163
1163
end
0 commit comments