@@ -48,13 +48,14 @@ test_that("write_stan_file writes Stan file correctly", {
4848
4949test_that(" write_stan_file writes to specified directory and filename" , {
5050 dir <- file.path(test_path(), " answers" )
51- expect_equal(dirname(f1 <- write_stan_file(stan_program , dir = dir , basename = " pasta" )), dir )
51+ expect_equal(dirname(f1 <- write_stan_file(stan_program , dir = dir , basename = " pasta" )),
52+ absolute_path(dir ))
5253 expect_equal(f2 <- write_stan_file(stan_program , dir = dir , basename = " fruit.stan" ),
53- file.path(dir , " fruit.stan" ))
54+ absolute_path( file.path(dir , " fruit.stan" ) ))
5455 expect_equal(f3 <- write_stan_file(stan_program , dir = dir , basename = " vegetable" ),
55- file.path(dir , " vegetable.stan" )) # should add .stan extension if missing
56+ absolute_path( file.path(dir , " vegetable.stan" ) )) # should add .stan extension if missing
5657 expect_equal(f4 <- write_stan_file(stan_program , dir = tempdir(), basename = " test" ),
57- file.path(tempdir(), " test.stan" ))
58+ absolute_path( file.path(tempdir(), " test.stan" ) ))
5859
5960 try(file.remove(f1 , f2 , f3 , f4 ), silent = TRUE )
6061})
0 commit comments