context("file") test_that("Empty Makefile includes only comment", { makefile <- format(makefile()) expect_match(makefile, "^# .* do not edit.*$") expect_equal(length(makefile), 1) }) test_that("Printing works as expected", { makefile <- capture.output(makefile()) expect_match(makefile, "^# .* do not edit.*$") expect_equal(length(makefile), 1) })