tests/testthat/test-mintyr_example.R

# WARNING - Generated by {fusen} from dev/flat_teaching.Rmd: do not edit by hand

# Test basic functionality and file existence
test_that("mintyr_example returns correct path for existing files", {
  # Test with existing file in the package
  expect_true(file.exists(mintyr_example("csv_test1.csv")))
  
  # Check if return value is a string
  expect_type(mintyr_example("csv_test1.csv"), "character")
  
  # Verify the returned path contains correct directory structure
  expect_match(mintyr_example("csv_test1.csv"), "extdata")
})
# Test file path resolution
test_that("mintyr_example returns correct path for existing files", {
  # Assuming example.csv exists in extdata directory
  result <- mintyr_example("csv_test1.csv")
  
  expect_true(file.exists(result))
  expect_type(result, "character")
  expect_match(result, "extdata")
})

Try the mintyr package in your browser

Any scripts or data that you put into this service are public.

mintyr documentation built on April 4, 2025, 2:56 a.m.