Skip to content

Commit 9ff998d

Browse files
committed
Test implicit S4 package inference
Register the test class in the package-like environment so the test continues to cover implicit package name inference from `.packageName`.
1 parent afbaa2a commit 9ff998d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/testthat/test-S4.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ test_that("S4_class_dispatch captures explicit package name", {
137137
test_that("S4_class_dispatch captures implicit package name", {
138138
env <- new.env()
139139
env$.packageName <- "mypkg"
140-
Foo1 := local_S4_class(package = "mypkg")
140+
Foo1 := local_S4_class(where = env)
141141
expect_equal(S4_class_dispatch("Foo1"), "S4/mypkg::Foo1")
142142
})
143143

0 commit comments

Comments
 (0)