Skip to content

Commit

Permalink
Switch Plumber$print() wording to use magrittr api (#742)
Browse files Browse the repository at this point in the history
Co-Authored-By: James Blair <blairj09@users.noreply.github.com>
  • Loading branch information
schloerke and blairj09 committed Dec 30, 2020
1 parent 9d29510 commit 5a7d95f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/plumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Plumber <- R6Class(
as.character(length(self$mounts)), " sub-router", ifelse(length(self$mounts) == 1, "", "s"),".\n", sep=""))

if(topLevel){
cat(prefix, crayon::silver("# Call run() on this object to start the API.\n"), sep="")
cat(prefix, crayon::silver("# Use `pr_run()` on this object to start the API.\n"), sep="")
}

# Filters
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-plumber-print.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_that("prints correctly", {

expected_output <- c(
"# Plumber router with 2 endpoints, 4 filters, and 2 sub-routers.",
"# Call run() on this object to start the API.",
"# Use `pr_run()` on this object to start the API.",
"├──[queryString]",
"├──[body]",
"├──[cookieParser]",
Expand All @@ -43,7 +43,7 @@ test_that("prints correctly", {

expected_output2 <- c(
"# Plumber router with 1 endpoint, 4 filters, and 0 sub-routers.",
"# Call run() on this object to start the API.",
"# Use `pr_run()` on this object to start the API.",
"├──[queryString]",
"├──[body]",
"├──[cookieParser]",
Expand Down Expand Up @@ -74,7 +74,7 @@ test_that("prints correctly", {

expected_output <- c(
"# Plumber router with 0 endpoints, 4 filters, and 1 sub-router.",
"# Call run() on this object to start the API.",
"# Use `pr_run()` on this object to start the API.",
"├──[queryString]",
"├──[body]",
"├──[cookieParser]",
Expand Down

0 comments on commit 5a7d95f

Please sign in to comment.