Skip to content

Conversation

@hadley
Copy link
Member

@hadley hadley commented May 8, 2023

And make it a little easier to use with ...

@hadley hadley requested a review from aronatkins May 8, 2023 22:48

test_that("returns relative paths", {
dir <- withr::local_tempdir()
dir <- local_temp_app()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you expect that this will become:

dir <- local_temp_app(
  "x/a" = "",
  "x/b" = "",
  "x/c" = "'
)

local_temp_app would need to change to dir.create(dirname(files)), but that's in reach, if you want it.

The challenge would be the cases where you want to create empty directories as part of the test set-up. Maybe:

dir <- local_temp_app(
    "packrat/" = ""
)

None of this is must-take. Just musing on ways to simply describe "create this set of files / directories" without requiring every test to have its own creation code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had contemplated that too. If you were thinking the same thing, I think it's a sign that it's worth doing.

#Conflicts:
#	tests/testthat/test-applications.R
#	tests/testthat/test-bundleFiles.R
#	tests/testthat/test-deployApp.R
#	tests/testthat/test-deploymentTarget.R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants