Overview of Nimble testing concepts
mainNimble is a testing framework for verifying the outcomes of Swift or Objective-C expressions. It uses a natural language syntax to define expectations. Key concepts include:
- Expression: A piece of Swift or Objective-C code (e.g.,
1 + 1). - Behavior: The result or side effect of an expression (e.g., returning
2). - Matcher: A Nimble function that checks an expression's behavior.
- Expectation: A combination of an expression and a matcher (e.g.,
expect(1 + 1).to(equal(2))). - Polling Expectation: An expectation that is continuously checked until it passes or times out.
- Requirement: An expectation that must pass before the test continues, typically defined using
require.