tests/testthat/test-S3-1-helpers.R

test_that("is_dir detects S3 dir paths", {
    s3 <- S3$new(verbose = FALSE)
    expect_false(s3$is_dir(local_dir))
    expect_true(s3$is_dir(remote_dir))
})

test_that("is_file detects S3 file paths", {
    s3 <- S3$new(verbose = FALSE)
    expect_false(s3$is_file(local_file))
    expect_true(s3$is_file(remote_file))
})
tidylab/S3 documentation built on June 28, 2022, 11:20 p.m.