From 0e5cd0c716ca8c6c108832e3aeef971c4244275c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Magnusson?= Date: Sat, 30 Dec 2017 21:03:47 +0100 Subject: [PATCH] Small fix --- R/expectations.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/expectations.R b/R/expectations.R index 9005990..9db5f63 100644 --- a/R/expectations.R +++ b/R/expectations.R @@ -14,7 +14,6 @@ #' @export expect_function_self_contained <- function(object, info = NULL, label = NULL) { - if(!is.null(info)) .Deprecated(msg = "argument info is deprecated with testthat 2.0") if(!is.null(label)) .Deprecated(msg = "argument label is deprecated with testthat 2.0") # 1. Capture object and label @@ -45,8 +44,7 @@ expect_function_self_contained <- function(object, info = NULL, label = NULL) { #' @export expect_attached_package <- function(pkg, info = NULL){ checkmate::assert_string(pkg) - if(!is.null(info)) .Deprecated(msg = "argument info is deprecated with testthat 2.0") - + # 2. Call expect() msg <- sprintf("Package '%s' is not used (attached).", pkg) expect(any(grepl(pkg, search())), msg)