tests/testthat/test-ai_tool_run_r_command.R

test_that("run_r_command - invalid args", {
  expect_error(run_r_command(list()), "Invalid arguments for RunRCommand")
})

test_that("run_r_command", {
  expect_equal(
    run_r_command(list(command = "print('hey!')")),
    list(output = '[1] "hey!"')
  )
})

Try the myownrobs package in your browser

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

myownrobs documentation built on Nov. 5, 2025, 5:52 p.m.