From 337033ea0bdb2a846fc3406f885a2700371376a7 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Wed, 3 Apr 2024 16:23:06 -0600 Subject: [PATCH] Update custom model to use `new_model_spec()` --- tests/testthat/test-mda.R | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/testthat/test-mda.R b/tests/testthat/test-mda.R index a9b6bd06..17931f26 100644 --- a/tests/testthat/test-mda.R +++ b/tests/testthat/test-mda.R @@ -46,13 +46,14 @@ test_that("mda + custom parsnip model + predict() works", { stop("`mode` should be 'classification'", call. = FALSE) } args <- list(sub_classes = rlang::enquo(sub_classes)) - out <- list(args = args, - eng_args = NULL, - mode = mode, - method = NULL, - engine = NULL) - class(out) <- make_classes("mixture_da") - out + new_model_spec( + "mixture_da", + args = args, + eng_args = NULL, + mode = mode, + method = NULL, + engine = NULL + ) } set_fit( model = "mixture_da",