Welcome to the documentation for the TempuraTesting framework!
Installation
To install TempuraTesting, you need to follow these steps:
- Open Terminal.
- Navigate to your project directory.
- Run the following command:
pod init
- Open the generated Podfile in a text editor.
- Add the following line:
pod 'TempuraTesting'
- Save the Podfile and run the following command:
pod install
- Close Xcode and open the project using the generated
.xcworkspace
file.
Usage
TempuraTesting helps you to write unit tests for your Tempura-based iOS app.
To use the TempuraTesting framework, follow these steps:
- Create a new Swift test case file.
- Inherit from
TempuraTestCase
. - Override the
viewIdentifier
computed property and provide the identifier of your Tempura view. - Use the provided builders and matchers to write your unit tests.
Examples
Here are a few examples of using TempuraTesting:
testWelcomeMessage
: Tests that the welcome message is displayed correctly on launch.testButtonAction
: Tests that the button triggers the correct action.testStateChangeSimulation
: Tests the correct behavior when the state changes.