From a1da9bab741a33d28f6f5eb930faacf1c80db62c Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Sun, 15 Feb 2015 15:18:11 -0800 Subject: [PATCH] Clean up some partial matches. (I don't know a sane way to test this, which may make it futile?) --- R/install.r | 2 +- R/vignettes.r | 2 +- tests/testthat/test-load-hooks.r | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/install.r b/R/install.r index 0cfd51c36..6e45cfbba 100644 --- a/R/install.r +++ b/R/install.r @@ -65,7 +65,7 @@ install <- function(pkg = ".", reload = TRUE, quick = FALSE, local = TRUE, install_deps(pkg, dependencies = dependencies, threads = threads) # Build the package. Only build locally if it doesn't have vignettes - has_vignettes <- length(tools::pkgVignettes(dir = pkg$path)$doc > 0) + has_vignettes <- length(tools::pkgVignettes(dir = pkg$path)$docs > 0) if (local && !(has_vignettes && build_vignettes)) { built_path <- pkg$path } else { diff --git a/R/vignettes.r b/R/vignettes.r index 9dd44e2dd..b21310fe1 100644 --- a/R/vignettes.r +++ b/R/vignettes.r @@ -16,7 +16,7 @@ build_vignettes <- function(pkg = ".") { pkg <- as.package(pkg) vigns <- tools::pkgVignettes(dir = pkg$path) - if (length(vigns$doc) == 0) return() + if (length(vigns$docs) == 0) return() message("Building ", pkg$package, " vignettes") tools::buildVignettes(dir = pkg$path, tangle = TRUE) diff --git a/tests/testthat/test-load-hooks.r b/tests/testthat/test-load-hooks.r index 472d23702..54a74aa96 100644 --- a/tests/testthat/test-load-hooks.r +++ b/tests/testthat/test-load-hooks.r @@ -8,7 +8,7 @@ test_that("hooks called in correct order", { } } reset_events <- function() { - assign("hooks", new.env(parent = emptyenv()), env = globalenv()) + assign("hooks", new.env(parent = emptyenv()), envir = globalenv()) h <- globalenv()$hooks h$events <- character() }