tests/testthat/test-step.R

describe("make_step", {
  it("should assert that step implementation has a context argument", {
    # Arrange
    implementation <- function() {

    }

    # Act, Assert
    expect_error(
      make_step("Given")("the Maker has the word {string}", implementation),
      regexp = "context",
      fixed = TRUE
    )
  })
})

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.