Nothing
box::use(
../../R/addition[add],
cucumber[
given,
when,
then,
]
)
when("I add {int} and {int}", function(x, y, context) {
context$result <- add(x, y)
})
then("the result is {int}", function(expected, context) {
expect_equal(context$result, expected)
})
when("I add {int} and {float}", function(x, y, context) {
context$result <- add(x, y)
})
when("I add {float} and {float}", function(x, y, context) {
context$result <- add(x, y)
})
when("I add {float} and {string}", function(x, y, context) {
context$lazy_result <- \() add(x, y)
})
then("the result is {float}", function(expected, context) {
expect_equal(context$result, expected)
})
then("the result is an error", function(context) {
expect_error(context$lazy_result())
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.