From 3516382929445ac097eb2fa4ac82010f83dc484f Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Sat, 6 Jan 2018 08:09:53 -0800 Subject: [PATCH] Rename test file --- tests/testthat/test-htmlwidgets.R | 36 +++++++++++++++++++++++++++++++ tests/testthat/test_htmlwidgets.R | 35 ------------------------------ 2 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 tests/testthat/test-htmlwidgets.R delete mode 100644 tests/testthat/test_htmlwidgets.R diff --git a/tests/testthat/test-htmlwidgets.R b/tests/testthat/test-htmlwidgets.R new file mode 100644 index 000000000..aca6faef4 --- /dev/null +++ b/tests/testthat/test-htmlwidgets.R @@ -0,0 +1,36 @@ +context("Creating objects with DiagrammeR, mermaid, and grViz") + +test_that("htmlwidgets object can be created", { + + diagrammer_htmlwidget <- + DiagrammeR(" + graph LR + A-->B + A-->C + C-->E + B-->D + C-->D + D-->F + E-->F") + + # Expect that the object inherits + # from `DiagrammeR` and `htmlwidget` + expect_is( + diagrammer_htmlwidget, c("DiagrammeR", "htmlwidget")) + + mermaid_htmlwidget <- + mermaid(" + graph LR + A-->B + A-->C + C-->E + B-->D + C-->D + D-->F + E-->F") + + # Expect that the object inherits + # from `DiagrammeR` and `htmlwidget` + expect_is( + mermaid_htmlwidget, c("DiagrammeR", "htmlwidget")) +}) diff --git a/tests/testthat/test_htmlwidgets.R b/tests/testthat/test_htmlwidgets.R deleted file mode 100644 index 320190bcb..000000000 --- a/tests/testthat/test_htmlwidgets.R +++ /dev/null @@ -1,35 +0,0 @@ -context("Creating objects with DiagrammeR, mermaid, and grViz") - -test_that("htmlwidgets object can be created", { - - diagrammer_htmlwidget <- DiagrammeR(" - graph LR - A-->B - A-->C - C-->E - B-->D - C-->D - D-->F - E-->F -") - - # Expect that the objects inherit from "DiagrammeR" and "htmlwidget" - expect_is(diagrammer_htmlwidget, "DiagrammeR") - expect_is(diagrammer_htmlwidget, "htmlwidget") - - mermaid_htmlwidget <- mermaid(" - graph LR - A-->B - A-->C - C-->E - B-->D - C-->D - D-->F - E-->F -") - - - # Expect that the objects inherit from "DiagrammeR" and "htmlwidget" - expect_is(mermaid_htmlwidget, "DiagrammeR") - expect_is(mermaid_htmlwidget, "htmlwidget") -})