Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions R/ard_stack.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ ard_stack <- function(data,
)
}

# assign new class -----------------------------------------------------------
class(ard_full) <- c("ard_stack", class(ard_full))

# return final ARD -----------------------------------------------------------
ard_full
}
Expand Down
10 changes: 8 additions & 2 deletions tests/testthat/test-ard_stack.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ test_that("ard_stack() works", {
NA
)

# Verify ard_stack class is assigned and ordered correctly
expect_s3_class(ard1, "ard_stack")
expect_identical(class(ard1)[1], "ard_stack")

expect_equal(
ard1,
bind_ard(
Expand Down Expand Up @@ -72,7 +76,8 @@ test_that("ard_stack() works", {
expect_equal(
ard2,
ard_match,
ignore_function_env = TRUE
ignore_function_env = TRUE,
ignore_attr = TRUE
)


Expand Down Expand Up @@ -112,7 +117,8 @@ test_that("ard_stack() adding overalls", {
)
expect_equal(
ard_test,
ard_match
ard_match,
ignore_attr = TRUE
)
})

Expand Down
Loading