expect_called: Expect a given function to be called during an expression.

Description Usage Arguments Value Examples

Description

Expect a given function to be called during an expression.

Usage

1
expect_called(function_name, expr)

Arguments

function_name

name. Either the name of the function, or a package function given by the :: or ::: operators.

expr

expression. An R expression that should somewhere during it execution call function_name.

Value

NULL, invisibly, but an error if the expectation is not satisfied (i.e., function_name is not called).

Examples

1
# expect_called(force, force(1))

robertzk/rum documentation built on May 27, 2019, 11:37 a.m.