TestSuiteA named group of tests — the unit a test file declares. Constructing one registers it in the global [Test]Suites registry, so a file just builds its suite and qn test collects and runs everything registered.
(TestSuite.new:{ var name = 'Math' }).add:{ .test: addition -> { .is:{ 1 + 1 } equalTo:2 } }
Declare the suite's contents: the block runs with the suite as self, so bare .test: (and .skip:) sends inside it land here. Answers self.
Register the new suite under name in [Test]Suites — registration IS construction; there is no separate register call.
The suite's name, shown as the [Tag] in reporter output.
The reason passed to skip:, or nil when the suite runs.
Internal: run the setup: blocks, in declaration order. TestRunner calls this before each test; a skipped suite's hooks never run.
Internal: run the setupAll: blocks, in declaration order.
Internal: run the teardown: blocks, in reverse declaration order.
Internal: run the teardownAll: blocks, in reverse declaration order.
A TestSuite prints as its name.
Declare a block to run before EACH test — per-test fixture construction. Share state with the tests the ordinary way: capture a var from the enclosing scope. Multiple setup: blocks run in declaration order. Answers self.
Declare a block to run ONCE, before the suite's first test — for a fixture every test shares read-only (build files, start a server). Multiple setupAll: blocks run in declaration order. Answers self.
Mark this whole suite skipped, with a human-readable reason (e.g. an optional native extension or driver isn't installed on this machine). A skipped suite registers no tests: the runner reports it as SKIPPED and it counts as neither a pass nor a failure, so the overall run stays green. Call it from an .add: block, typically in the else: of an availability check.
true once skip: has marked the suite.
Declare a block to run after EACH test — the setup:'s undo, run whether or not the test's assertions passed. Multiple teardown: blocks run in REVERSE declaration order (last declared, first run — teardowns unwind). Answers self.
Declare a block to run ONCE, after the suite's last test — remove what setupAll: built. Multiple teardownAll: blocks run in REVERSE declaration order. Answers self.
Add one test: m is a method literal (name -> { … }) whose body makes assertion sends and whose selector names the test. The method may declare at most one parameter.
The Tests declared so far, in declaration order.