diff --git a/R/class_junction.R b/R/class_junction.R index 34867e68..d615604a 100644 --- a/R/class_junction.R +++ b/R/class_junction.R @@ -23,7 +23,7 @@ junction_upstream_edges <- function(junction) { data_frame(from = from, to = to) } -junction_get_splits <- function(junction) { +junction_splits <- function(junction) { as.character(junction$splits) } diff --git a/R/class_pattern.R b/R/class_pattern.R index bd3e4ad8..5099e816 100644 --- a/R/class_pattern.R +++ b/R/class_pattern.R @@ -44,7 +44,7 @@ pattern_s3_class <- c("tar_pattern", "tar_target") #' @export target_get_children.tar_pattern <- function(target) { - junction_get_splits(target$junction) + junction_splits(target$junction) } #' @export diff --git a/R/class_stem.R b/R/class_stem.R index f28023af..a9109013 100644 --- a/R/class_stem.R +++ b/R/class_stem.R @@ -47,7 +47,7 @@ target_get_children.tar_stem <- function(target) { if_any( is.null(target$junction), character(0), - junction_get_splits(target$junction) + junction_splits(target$junction) ) } diff --git a/tests/testthat/test-class_junction.R b/tests/testthat/test-class_junction.R index 8f35e46b..b7d6699a 100644 --- a/tests/testthat/test-class_junction.R +++ b/tests/testthat/test-class_junction.R @@ -5,15 +5,15 @@ tar_test("junction deps", { expect_equal(out, exp) }) -tar_test("junction_get_splits()", { +tar_test("junction_splits()", { x <- junction_init("x", letters, list(a = LETTERS, b = rev(letters))) - expect_equal(junction_get_splits(x), letters) + expect_equal(junction_splits(x), letters) }) tar_test("junction_invalidate()", { x <- junction_init("x", letters, list(a = LETTERS, b = rev(letters))) junction_invalidate(x) - expect_equal(junction_get_splits(x), rep(NA_character_, length(x$splits))) + expect_equal(junction_splits(x), rep(NA_character_, length(x$splits))) }) tar_test("junction_upstream_edges()", {