another (third?) alternative idea for the existing source_pef()-clumsiness, after #11 #4 have failed:
It'd be nice to have some magic markup/decoration inside the testthat that can then be called from roxygen decorators, like so (absolute pseudocode):
testthat/test-foo.R:
res <- {#' @exampleFromTestthat bar_1
bar_fun(1, 2)
}
test_that("lorem", expect_true(res))
R/foo.R:
#' Foo function
#' @reuseExamplesFromTestthat bar_1
...