@@ -233,39 +233,39 @@ describe("Path2", function()
233
233
234
234
describe (" .exists()" , function ()
235
235
it_cross_plat (" finds files that exist" , function ()
236
- assert .are . same ( true , Path :new (" README.md" ):exists ())
236
+ assert .is_true ( Path :new (" README.md" ):exists ())
237
237
end )
238
238
239
239
it_cross_plat (" returns false for files that do not exist" , function ()
240
- assert .are . same ( false , Path :new (" asdf.md" ):exists ())
240
+ assert .is_false ( Path :new (" asdf.md" ):exists ())
241
241
end )
242
242
end )
243
243
244
244
describe (" .is_dir()" , function ()
245
245
it_cross_plat (" should find directories that exist" , function ()
246
- assert .are . same ( true , Path :new (" lua" ):is_dir ())
246
+ assert .is_true ( Path :new (" lua" ):is_dir ())
247
247
end )
248
248
249
249
it_cross_plat (" should return false when the directory does not exist" , function ()
250
- assert .are . same ( false , Path :new (" asdf" ):is_dir ())
250
+ assert .is_false ( Path :new (" asdf" ):is_dir ())
251
251
end )
252
252
253
253
it_cross_plat (" should not show files as directories" , function ()
254
- assert .are . same ( false , Path :new (" README.md" ):is_dir ())
254
+ assert .is_false ( Path :new (" README.md" ):is_dir ())
255
255
end )
256
256
end )
257
257
258
258
describe (" .is_file()" , function ()
259
259
it_cross_plat (" should not allow directories" , function ()
260
- assert .are . same ( true , not Path :new (" lua" ):is_file ())
260
+ assert .is_true ( not Path :new (" lua" ):is_file ())
261
261
end )
262
262
263
263
it_cross_plat (" should return false when the file does not exist" , function ()
264
- assert .are . same ( true , not Path :new (" asdf" ):is_file ())
264
+ assert .is_true ( not Path :new (" asdf" ):is_file ())
265
265
end )
266
266
267
267
it_cross_plat (" should show files as file" , function ()
268
- assert .are . same ( true , Path :new (" README.md" ):is_file ())
268
+ assert .is_true ( Path :new (" README.md" ):is_file ())
269
269
end )
270
270
end )
271
271
@@ -321,7 +321,7 @@ describe("Path2", function()
321
321
it_cross_plat (" can take absolute paths and make them relative to the root directory" , function ()
322
322
local p = Path :new { root (), " prime" , " aoeu" , " agen.lua" }
323
323
local relative = Path :new (p :absolute ()):make_relative (root ())
324
- assert .are .same ((p .filename :gsub (root (), " " )), relative )
324
+ assert .are .same ((p .filename :gsub (" ^ " .. root (), " " )), relative )
325
325
end )
326
326
327
327
it_cross_plat (" can take absolute paths and make them relative to themselves" , function ()
0 commit comments