diff --git a/DESCRIPTION b/DESCRIPTION index bd3cbc2..6b70ac0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,17 @@ Package: R62S3 Title: Automatic Method Generation from R6 -Version: 1.4.0 +Version: 1.4.1 Authors@R: person("Raphael", "Sonabend", email = "raphael.sonabend.15@ucl.ac.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9225-4654")) Description: After defining an R6 class, R62S3 is used to automatically generate optional S3/S4 generics and methods for dispatch. Also allows piping for R6 objects. -Depends: R (>= 3.5.0) -Imports: methods, data.table -Suggests: testthat, R6, pkgdown +Depends: + R (>= 3.5.0) +Imports: + data.table, + methods +Suggests: + pkgdown, + testthat, + R6 License: MIT + file LICENSE Encoding: UTF-8 LazyData: true diff --git a/NEWS.md b/NEWS.md index 68e389c..aa2ae40 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# R62S3 1.4.1 + +* Fixed breakage due to `plot` being moved from `graphics` to `base` + # R62S3 1.4.0 ## Minor Updates diff --git a/tests/testthat/test-R62Fun.R b/tests/testthat/test-R62Fun.R index 10c2908..5c3b248 100644 --- a/tests/testthat/test-R62Fun.R +++ b/tests/testthat/test-R62Fun.R @@ -11,16 +11,16 @@ test_that("no generic",{ expect_error(utils::isS3stdGeneric("R62Funprinter")) }) -plotter <- R6::R6Class("plotter", public = list(plot = function() return("I am plotting"))) +plotter <- R6::R6Class("plotter", public = list(acos = function() return("I am plotting"))) test_that("detect = TRUE, mask = FALSE",{ expect_silent(R62Fun(plotter, detectGeneric = TRUE, mask = FALSE, assignEnvir = topenv())) - expect_equal(plot(plotter$new()), "I am plotting") - expect_equal(find("plot"), "package:graphics") + expect_equal(acos(plotter$new()), "I am plotting") + expect_equal(find("acos"), "package:base") }) test_that("detect = FALSE, mask = TRUE",{ expect_silent(R62Fun(plotter, detectGeneric = FALSE, assignEnvir = topenv(), mask = TRUE)) - expect_equal(plot(plotter$new()), "I am plotting") - expect_equal(names(formals(plot))[[1]], "object") + expect_equal(acos(plotter$new()), "I am plotting") + expect_equal(names(formals(acos))[[1]], "object") })