Expected `grepl(...)` to be TRUE.
Differences:
`actual`:   FALSE
`expected`: TRUE

# user can provide a directory that already exists (and is empty)
dir.create(path = temp_dir, recursive = TRUE)
# if directory does not exist, it should be created and used
# error if directory exists and contains files
dir.create(path = temp_dir_non_empty, recursive = TRUE)
dir.create(path = temp_dir_diag, recursive = TRUE)
dir.create(path = temp_dir_study, recursive = TRUE)
test_that("INSTRUCTIONS.md is created with correct content", {
# INSTRUCTIONS.md should be created with both diagnostics and study
dir.create(path = temp_dir_both, recursive = TRUE)
# Check content includes both diagnostics and study instructions
instructions_text <- paste(instructions_both, collapse = " ")
expect_true(grepl("Running the Diagnostics Code", instructions_text))
expect_true(grepl("Running the Study Code", instructions_text))
dir.create(path = temp_dir_diag_only, recursive = TRUE)
instructions_diag_text <- paste(instructions_diag, collapse = " ")
expect_true(grepl("Running the Diagnostics Code", instructions_diag_text))
expect_false(grepl("Running the Study Code", instructions_diag_text))
dir.create(path = temp_dir_study_only, recursive = TRUE)
instructions_study_text <- paste(instructions_study, collapse = " ")
expect_false(grepl("Running the Diagnostics Code", instructions_study_text))
expect_true(grepl("Running the Study Code", instructions_study_text))
test_that("README.md files point to INSTRUCTIONS.md", {
initStudy(directory = temp_dir, diagnostics = TRUE, study = TRUE)
# Check that subfolder READMEs reference the central instructions
study_readme <- readLines(file.path(temp_dir, "studyCode", "README.md"))
test_that("README.md folder labels do not include trailing slashes", {
readme_text <- paste(readme_lines, collapse = "\n")

"INSTRUCTIONS.md is created with correct content"
"README.md files point to INSTRUCTIONS.md"
"README.md folder labels do not include trailing slashes"

README.md folder labels do not include trailing slashes