New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expect_equal_to_reference default behavior changed #683

Closed
brodieG opened this Issue Nov 15, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@brodieG
Contributor

brodieG commented Nov 15, 2017

With the transition to expect_known, I think there was a regression introduced with respect to expect_equal_to_reference :

 #' @export
-#' @rdname expect_known_value
+#' @rdname expect_known_output
 #' @usage NULL
-expect_equal_to_reference <- expect_known_value
+expect_equal_to_reference <- function(..., update = FALSE) {
+  expect_known_value(..., update = TRUE)
+}

Should be:

expect_equal_to_reference <- function(..., update = FALSE) {
  expect_known_value(..., update = update)
}

Happy to submit a PR if you want, but it may be easier for you guys to fix. Let me know. For reference, the NEWS entry suggests the change is not intentional:

expect_known_value() replaces expect_equal_to_reference(), which has been soft-deprecated. It gains an update argument defaulting to TRUE. This changes behaviour from the previous version, and soft-deprecated expect_equal_to_reference() gets update = FALSE.

@hadley

This comment has been minimized.

Member

hadley commented Nov 15, 2017

Doh. A PR would be great, although it's already been submitted to CRAN 😢

@brodieG

This comment has been minimized.

Contributor

brodieG commented Nov 15, 2017

Oh well, will submit PR later this week then. Still have to get my update to unitizer out so that it works with testthat 2.0.

@jimhester

This comment has been minimized.

Member

jimhester commented Mar 29, 2018

closed by #687

@jimhester jimhester closed this Mar 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment