test_that("new_api() works", {
api <- new_api()
expect_s3_class(
api,
c("Plumber", "Hookable", "R6")
)
# The run() method is available within the object
expect_equal(
ls(api, pattern = "^run$"),
"run"
)
})
test_that("generate_api() works", {
api <- generate_api()
expect_s3_class(
api,
c("Plumber", "Hookable", "R6")
)
# The run() method is available within the object
expect_equal(
ls(api, pattern = "^run$"),
"run"
)
})
new_api() is from mariobox, not the created API
So when we test, this fails.
Suggestion:
and