@@ -233,39 +233,39 @@ describe("Path2", function()
233233
234234 describe (" .exists()" , function ()
235235 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 ())
237237 end )
238238
239239 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 ())
241241 end )
242242 end )
243243
244244 describe (" .is_dir()" , function ()
245245 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 ())
247247 end )
248248
249249 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 ())
251251 end )
252252
253253 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 ())
255255 end )
256256 end )
257257
258258 describe (" .is_file()" , function ()
259259 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 ())
261261 end )
262262
263263 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 ())
265265 end )
266266
267267 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 ())
269269 end )
270270 end )
271271
@@ -321,7 +321,7 @@ describe("Path2", function()
321321 it_cross_plat (" can take absolute paths and make them relative to the root directory" , function ()
322322 local p = Path :new { root (), " prime" , " aoeu" , " agen.lua" }
323323 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 )
325325 end )
326326
327327 it_cross_plat (" can take absolute paths and make them relative to themselves" , function ()
0 commit comments