Skip to content

Commit

Permalink
Fix bad test
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Jan 18, 2024
1 parent 5562aad commit ceb0d66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ detect_orderly_interactive_path <- function(path = getwd(),
# doesn't make individual bullet points available in the condition object.
# The following mimicks cli_abort more closely, making testing easier.
msg <- c(
"Working directory {.path {path}} does not match the report currently open in RStudio.",
i = "Use {.code setwd({.str {suggested_wd}})} to switch working directories.")
rlang::warn(vcapply(msg, cli::format_inline), use_cli_format = TRUE)
cli::format_inline("Working directory {.path {path}} does not match the report currently open in RStudio."),
cli::format_inline(i = "Use {.code setwd({.str {suggested_wd}})} to switch working directories."))
rlang::warn(msg, use_cli_format = TRUE)
}
as.character(fs::path_norm(file.path(path, "../..")))
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test_that("can detect orderly directory", {
root <- test_prepare_orderly_example("explicit")
detected_root <- detect_orderly_interactive_path(
file.path(root, "src", "explicit"))
expect_equal(detected_root)
expect_equal(detected_root, root)
})

test_that("errors when working directory is not report", {
Expand Down

0 comments on commit ceb0d66

Please sign in to comment.