tests/testthat/test-parse_docstring.R

describe("parse_docstring", {
  it("should remove the first and last lines of a docstring", {
    # Arrange
    lines <- c(
      "\"\"\"",
      "a",
      "b",
      "\"\"\""
    )

    # Act
    result <- parse_docstring(lines)

    # Assert
    expect_equal(result, c("a", "b"))
  })
})

Try the cucumber package in your browser

Any scripts or data that you put into this service are public.

cucumber documentation built on June 30, 2024, 1:07 a.m.