What problem does it solve?
This Skill simplifies the creation of comprehensive TestBox BDD test specs for CFWheels models, controllers, and integration workflows. It ensures high code quality, reliability, and maintainability by providing structured templates and best practices for testing.
Core Features & Use Cases
- Model Test Templates: Generates specs for testing model validations, associations, and custom methods.
- Controller Test Templates: Creates specs for verifying controller actions, filters, and redirects.
- Integration Test Templates: Provides templates for end-to-end testing of user workflows and CRUD operations.
- Use Case: After creating a
Post model, use this skill to generate a test spec that verifies its validations (e.g., title presence), associations (e.g., hasMany comments), and CRUD operations. This ensures your model behaves exactly as expected, catching bugs early and saving you debugging time.
Quick Start
Example Model Test:
component extends="wheels.Test" {
function testValidatesPresenceOfTitle() {
model = model("Post").new(title="");
assert("!model.valid()");
}
}