From d28d7808d68f210b0425f654da24d871ee037471 Mon Sep 17 00:00:00 2001 From: Tony Fischetti Date: Wed, 5 Feb 2020 13:50:59 -0500 Subject: [PATCH] fixed new warnings and errors --- DESCRIPTION | 2 +- tests/testthat/test-assertions.R | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0dd2cb0..8ec7744 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: assertr Type: Package Title: Assertive Programming for R Analysis Pipelines -Version: 2.6 +Version: 2.7 Authors@R: person("Tony", "Fischetti", email="tony.fischetti@gmail.com", role = c("aut", "cre")) diff --git a/tests/testthat/test-assertions.R b/tests/testthat/test-assertions.R index 2dd4afe..275a7b4 100644 --- a/tests/testthat/test-assertions.R +++ b/tests/testthat/test-assertions.R @@ -222,7 +222,7 @@ test_that("assert breaks appropriately", { expect_error(assert(in_set(0,1), mtcars$vs), "assert requires columns to be selected. Check number of arguments") expect_error(assert(mtcars, in_set(0,1), vs, tree), - "object 'tree' not found") + class="error") expect_error(assert(mtcars, in_set(0,1), vs, "tree")) expect_error(assert("tree"), "argument \"predicate\" is missing, with no default") @@ -288,7 +288,7 @@ test_that("assert_rows breaks appropriately", { expect_error(assert_rows(rowSums, in_set(0,1), mtcars$vs), "assert_rows requires columns to be selected. Check number of arguments") expect_error(assert_rows(mtcars, rowSums, in_set(0,1,2), vs, am, tree), - "object 'tree' not found") + class="error") expect_error(assert_rows(mtcars, rowSums, in_set(0,1,2), vs, am, "tree")) expect_error(assert_rows("tree"), "argument \"row_reduction_fn\" is missing, with no default") @@ -339,7 +339,7 @@ test_that("insist breaks appropriately", { "insist requires columns to be selected. Check number of arguments") expect_error(insist(mtcars, within_n_sds(5), "vs:am")) expect_error(insist(mtcars, within_n_sds(5), tree), - "object 'tree' not found") + class="error") expect_error(insist("tree"), "argument \"predicate_generator\" is missing, with no default") expect_error(insist(iris, within_n_sds(5), Petal.Width:Species),