SexySpex.Helpers (sexy_spex v0.1.0)
View SourceCommon helper functions for spex files.
These helpers provide reusable patterns for application startup, connectivity testing, and other common spex operations.
Summary
Functions
Checks if an application is currently running.
Checks if we can connect to a Scenic MCP server on the given port.
Starts a Scenic application with MCP server and waits for it to be ready.
Waits for MCP server to be ready with configurable retries.
Functions
Checks if an application is currently running.
Checks if we can connect to a Scenic MCP server on the given port.
Starts a Scenic application with MCP server and waits for it to be ready.
This helper handles the common pattern of:
- Ensuring compilation (needed for mix spex)
- Starting the application
- Waiting for MCP server
- Setting up cleanup
Parameters
app_name
- The application atom (e.g.,:quillex
)opts
- Optional configuration:port
- MCP server port (default: 9999):timeout_retries
- Connection timeout retries (default: 20)
Returns
{:ok, context}
with app_name and port on success- Raises on failure
Example
setup_all do
start_scenic_app(:quillex)
end
Waits for MCP server to be ready with configurable retries.