test_that("aviary_packages() lists exactly the three component packages", { pkgs <- aviary:::aviary_packages() expect_named(pkgs, c("mudnester", "starling", "bowerbird")) expect_type(pkgs, "character") }) test_that("library(aviary) attaches all three component packages", { skip_if_not_installed("mudnester") skip_if_not_installed("starling") skip_if_not_installed("bowerbird") # aviary is already attached by tests/testthat.R by the time this runs, # which is what triggers .onAttach() — so this test is really checking # that .onAttach() did its job, not re-triggering it. expect_true("package:mudnester" %in% search()) expect_true("package:starling" %in% search()) expect_true("package:bowerbird" %in% search()) })