tests/testthat/test-get_path.R

context("get_tracerer_path")

test_that("use", {

  testthat::expect_equal(
    system.file("extdata", "beast2_example_output.log", package = "tracerer"),
    tracerer:::get_tracerer_path("beast2_example_output.log")
  )

  testthat::expect_equal(
    system.file("extdata", "beast2_example_output.trees", package = "tracerer"),
    tracerer:::get_tracerer_path("beast2_example_output.trees")
  )

})

test_that("abuse", {

  testthat::expect_error(
    tracerer:::get_tracerer_path("abs.ent"),
    "'filename' must be the name of a file in 'inst/extdata'"
  )

})
ropensci/tracerer documentation built on March 12, 2019, 8:30 p.m.