Skip to content

Commit

Permalink
Don't reuse existing name
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Feb 11, 2014
1 parent ce34587 commit 8339169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/test.r
Expand Up @@ -17,7 +17,7 @@ test <- function(pkg = ".", filter = NULL, fresh = FALSE) {
check_testthat()
pkg <- as.package(pkg)

if (!has_tests(pkg) && interactive()) {
if (!uses_testthat(pkg) && interactive()) {
message("No testing infrastructure found. Create it?")
if (menu(c("Yes", "No")) == 1) {
add_test_infrastructure(pkg)
Expand Down Expand Up @@ -83,7 +83,7 @@ devtest <- function(package) {
path
}

has_tests <- function(pkg = ".") {
uses_testthat <- function(pkg = ".") {
pkg <- as.package(pkg)

paths <- c(
Expand All @@ -108,7 +108,7 @@ add_test_infrastructure <- function(pkg = ".") {
pkg <- as.package(pkg)

check_testthat()
if (has_tests(pkg)) {
if (uses_testthat(pkg)) {
stop("Package already has testing infrastructure", call. = FALSE)
}

Expand Down
2 changes: 1 addition & 1 deletion man/has_tests.Rd
Expand Up @@ -2,7 +2,7 @@
\alias{has_tests}
\title{Was devtools installed with tests?}
\usage{
has_tests(pkg = ".")
has_tests()
}
\description{
Was devtools installed with tests?
Expand Down

0 comments on commit 8339169

Please sign in to comment.