tests/testthat/test-get_beautier_path.R

context("get_beautier_path")

test_that("use", {

  testthat::expect_equal(
    system.file("extdata", "anthus_nd2.fas", package = "beautier"),
    beautier::get_beautier_path("anthus_nd2.fas")
  )

  testthat::expect_equal(
    system.file("extdata", "anthus_aco.fas", package = "beautier"),
    beautier::get_beautier_path("anthus_aco.fas")
  )

})

test_that("abuse", {

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

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