Skip to content

Commit

Permalink
Enable S7 pre-4.3. (#25)
Browse files Browse the repository at this point in the history
* Enable S7 pre-4.3.

This won't be needed soon, but I want to make my checks happy until that fix is merged.

* Get rid of unneeded snapshot.

The cleaner has strangeness specfiically for the snapshot quotes. I'll work on getting rid of that later.
  • Loading branch information
jonthegeek committed Sep 14, 2023
1 parent 6dbb530 commit 0623e72
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(generate_pkg)
export(pkg_agent)
export(use_beekeeper)
if (getRversion() < "4.3.0") importFrom("S7", "@")
importFrom(glue,glue)
importFrom(nectar,call_api)
importFrom(rapid,as_rapid)
Expand Down
4 changes: 4 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.onLoad <- function(...) {
S7::methods_register() # nocov
}

# enable usage of <S7_object>@name in package code
#' @rawNamespace if (getRversion() < "4.3.0") importFrom("S7", "@")
NULL
11 changes: 0 additions & 11 deletions tests/testthat/_snaps/use_beekeeper.md

This file was deleted.

10 changes: 7 additions & 3 deletions tests/testthat/test-use_beekeeper.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ test_that("config writes a yml", {
expect_identical(test_result, config_path)
reread_rapid <- readRDS(rapid_write_path)
expect_identical(guru_rapid, reread_rapid)
test_result_file <- readLines(config_path)
expect_snapshot(
test_result_file <- scrub_config(readLines(config_path))
expected_result_file <- scrub_config(
readLines(test_path("_fixtures", "guru_beekeeper.yml"))
)
expected_result_file[[4]] <- "rapid_file: RAPID_FILE_PATH\""
expect_identical(
test_result_file,
transform = scrub_config
expected_result_file
)
})

0 comments on commit 0623e72

Please sign in to comment.