From a1e2b8d75c47fe399e51e4726689e4ee390976f1 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Thu, 25 Jun 2020 11:06:22 +0200 Subject: [PATCH] docs: reference formula assertions for tests --- docs/Formula-Cookbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index ac475face9..19f38b0a2e 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -261,7 +261,7 @@ We want tests that don't require any user input and test the basic functionality See [`cmake`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation. -You can check that the output is as expected with `assert_equal` or `assert_match` on the output of shell_output such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/envv.rb): +You can check that the output is as expected with `assert_equal` or `assert_match` on the output of the [Formula assertions](https://rubydoc.brew.sh/Homebrew/Assertions.html) such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/envv.rb): ```ruby assert_equal "mylist=A:C; export mylist", shell_output("#{bin}/envv del mylist B").strip