diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R new file mode 100644 index 0000000000..0abfb14e03 --- /dev/null +++ b/R/my_first_fcn.R @@ -0,0 +1,8 @@ +#' Send welcoming message to the user +#' +#' @details +#' This is a function that prints a welcoming message to the terminal that +#' greets the user. +my_first_fcn <- function() { + "Welcome to the admiral family!" +} diff --git a/man/my_first_fcn.Rd b/man/my_first_fcn.Rd new file mode 100644 index 0000000000..abb0bf2688 --- /dev/null +++ b/man/my_first_fcn.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/my_first_fcn.R +\name{my_first_fcn} +\alias{my_first_fcn} +\title{Send welcoming message to the user} +\usage{ +my_first_fcn() +} +\description{ +Send welcoming message to the user +} +\details{ +This is a function that prints a welcoming message to the terminal that +greets the user. +} diff --git a/tests/testthat/test-my_first_fcn.R b/tests/testthat/test-my_first_fcn.R new file mode 100644 index 0000000000..d7e730a20f --- /dev/null +++ b/tests/testthat/test-my_first_fcn.R @@ -0,0 +1,6 @@ +## Test 1: Verifying the message function works fine and prints out the message ---- +test_that("Message printing works", { + expected_output <- "Welcome to the admiral family!" + actual_output <- my_first_fcn() + expect_equal(expected_output, actual_output) +})