Skip to content

Commit a09d794

Browse files
committed
refactor: rename testbox namespace to wheelstest (WheelsTest)
Consume the TestBox codebase under a Wheels-specific namespace, mirroring the WireBox → Injector pattern. This removes the Ortus dependency while keeping the BDD DSL fully compatible. Changes: - Rename vendor/wheels/testbox/ → vendor/wheels/wheelstest/ - Update all internal refs: wheels.testbox.system.* → wheels.wheelstest.system.* - Create vendor/wheels/WheelsTest.cfc as the new base test class - Convert vendor/wheels/Testbox.cfc to a deprecated backward-compat alias - Update controllers, runners, MCP server, CLI templates, test specs, snippets, VS Code configs, and all documentation Backward compatibility: - extends="wheels.Testbox" still works via the alias CFC - All new tests should use extends="wheels.WheelsTest" https://claude.ai/code/session_012WfDwvqmncxZiJY3Ns8n6r
1 parent 0f53981 commit a09d794

File tree

171 files changed

+326
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+326
-316
lines changed

.ai/wheels/controllers/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Comprehensive guide to testing Wheels controllers using TestBox 5 with modern BD
88
### Modern Test Structure (TestBox 5)
99
```cfm
1010
// tests/specs/controllers/ProductsControllerSpec.cfc
11-
component extends="wheels.Testbox" {
11+
component extends="wheels.WheelsTest" {
1212
1313
function beforeAll() {
1414
// Setup once before all tests

.ai/wheels/models/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Comprehensive guide to testing Wheels models using TestBox 5 with modern BDD (Be
1010
/**
1111
* UserModelSpec - Test User model functionality using BDD
1212
*/
13-
component extends="wheels.Testbox" {
13+
component extends="wheels.WheelsTest" {
1414
1515
function run() {
1616
describe("User Model", () => {

.ai/wheels/views/testing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
```cfm
88
// tests/specs/views/UserViewSpec.cfc
9-
component extends="wheels.Testbox" {
9+
component extends="wheels.WheelsTest" {
1010
1111
function run() {
1212
describe("User View Components", () => {
@@ -39,7 +39,7 @@ component extends="wheels.Testbox" {
3939
### Testing Partials with BDD
4040

4141
```cfm
42-
component extends="wheels.Testbox" {
42+
component extends="wheels.WheelsTest" {
4343
4444
function run() {
4545
describe("User Card Partial", () => {
@@ -107,7 +107,7 @@ component extends="wheels.Testbox" {
107107
### Testing Form Helpers with BDD
108108

109109
```cfm
110-
component extends="wheels.Testbox" {
110+
component extends="wheels.WheelsTest" {
111111
112112
function run() {
113113
describe("Form Helper Testing", () => {
@@ -160,7 +160,7 @@ component extends="wheels.Testbox" {
160160
### Testing View Helpers with BDD
161161

162162
```cfm
163-
component extends="wheels.Testbox" {
163+
component extends="wheels.WheelsTest" {
164164
165165
function run() {
166166
describe("View Helper Functions", () => {
@@ -209,7 +209,7 @@ component extends="wheels.Testbox" {
209209
### Integration Testing with Controllers using BDD
210210

211211
```cfm
212-
component extends="wheels.Testbox" {
212+
component extends="wheels.WheelsTest" {
213213
214214
function run() {
215215
describe("View Integration Testing", () => {
@@ -261,7 +261,7 @@ component extends="wheels.Testbox" {
261261
### Testing AJAX Responses with BDD
262262

263263
```cfm
264-
component extends="wheels.Testbox" {
264+
component extends="wheels.WheelsTest" {
265265
266266
function run() {
267267
describe("AJAX Response Testing", () => {
@@ -306,7 +306,7 @@ component extends="wheels.Testbox" {
306306
### Testing Flash Messages with BDD
307307

308308
```cfm
309-
component extends="wheels.Testbox" {
309+
component extends="wheels.WheelsTest" {
310310
311311
function run() {
312312
describe("Flash Message Display", () => {
@@ -485,7 +485,7 @@ curl -s http://localhost:8080 | grep '#urlFor' # Should return empty (
485485
### Integration Testing Pattern
486486

487487
```cfm
488-
component extends="wheels.Testbox" {
488+
component extends="wheels.WheelsTest" {
489489
function run() {
490490
describe("Content Verification Tests", () => {
491491

.vscode/wheels-test.code-snippets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"TestBox Spec": {
44
"prefix": "tbspec",
55
"body": [
6-
"component extends=\"wheels.Testbox\" {",
6+
"component extends=\"wheels.WheelsTest\" {",
77
"\t",
88
"\tfunction run() {",
99
"\t\t",
@@ -28,7 +28,7 @@
2828
"Model Test": {
2929
"prefix": "tbmodel",
3030
"body": [
31-
"component extends=\"wheels.Testbox\" {",
31+
"component extends=\"wheels.WheelsTest\" {",
3232
"\t",
3333
"\tfunction run() {",
3434
"\t\t",
@@ -61,7 +61,7 @@
6161
"Controller Test": {
6262
"prefix": "tbcontroller",
6363
"body": [
64-
"component extends=\"wheels.Testbox\" {",
64+
"component extends=\"wheels.WheelsTest\" {",
6565
"\t",
6666
"\tfunction run() {",
6767
"\t\t",
@@ -93,7 +93,7 @@
9393
"API Test": {
9494
"prefix": "tbapi",
9595
"body": [
96-
"component extends=\"wheels.Testbox\" {",
96+
"component extends=\"wheels.WheelsTest\" {",
9797
"\t",
9898
"\tfunction run() {",
9999
"\t\t",
@@ -129,7 +129,7 @@
129129
"Integration Test": {
130130
"prefix": "tbintegration",
131131
"body": [
132-
"component extends=\"wheels.Testbox\" {",
132+
"component extends=\"wheels.WheelsTest\" {",
133133
"\t",
134134
"\tfunction run() {",
135135
"\t\t",

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ tests/
688688

689689
### Model Testing
690690
```cfm
691-
component extends="wheels.Testbox" {
691+
component extends="wheels.WheelsTest" {
692692
693693
function beforeAll() {
694694
// Setup for all tests in this spec

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Every variable passed from controller to view needs a cfparam declaration.
156156
- **config()**: All model associations/validations/callbacks and controller filters/verifies go in `config()`
157157
- **Naming**: Models are singular PascalCase (`User.cfc`), controllers are plural PascalCase (`Users.cfc`), table names are plural lowercase (`users`)
158158
- **Parameters**: `params.key` for URL key, `params.user` for form struct, `params.user.firstName` for nested
159-
- **extends**: Models extend `"Model"`, controllers extend `"Controller"`, tests extend `"wheels.Test"` or `"wheels.Testbox"`
159+
- **extends**: Models extend `"Model"`, controllers extend `"Controller"`, tests extend `"wheels.Test"` or `"wheels.WheelsTest"`
160160
- **Associations**: All named params when using options: `hasMany(name="orders")`, `belongsTo(name="user")`, `hasOne(name="profile")`
161161
- **Validations**: Property param is `property` (singular) for single, `properties` (plural) for list: `validatesPresenceOf(properties="name,email")`
162162

@@ -211,7 +211,7 @@ Helpers: `linkTo(route="user", key=user.id, text="View")`, `urlFor(route="users"
211211
## Testing Quick Reference
212212

213213
```cfm
214-
component extends="wheels.Testbox" {
214+
component extends="wheels.WheelsTest" {
215215
function run() {
216216
describe("User", function() {
217217
it("validates presence of name", function() {

app/snippets/tests/controller.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="wheels.Testbox" {
1+
component extends="wheels.WheelsTest" {
22

33
function beforeAll() {
44
// Setup test data once for all tests in this component

app/snippets/tests/model.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="wheels.Testbox" {
1+
component extends="wheels.WheelsTest" {
22

33
function beforeAll() {
44
// Setup test data once for all tests in this component

app/snippets/tests/view.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="wheels.Testbox" {
1+
component extends="wheels.WheelsTest" {
22

33
function beforeAll() {
44
// Setup test data once for all tests in this component

cli/src/commands/wheels/generate/test.cfc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ component aliases='wheels g test' extends="../base" {
236236
boolean crud = false,
237237
boolean factory = false
238238
) {
239-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
239+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
240240
content &= chr(9) & 'function run() {' & chr(10) & chr(10);
241241
content &= chr(9) & chr(9) & 'describe("#obj.objectNameSingularC# Model", function() {' & chr(10) & chr(10);
242242

@@ -347,7 +347,7 @@ component aliases='wheels g test' extends="../base" {
347347
boolean crud = false,
348348
boolean mock = false
349349
) {
350-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
350+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
351351
content &= chr(9) & 'function beforeAll() {' & chr(10);
352352
content &= chr(9) & chr(9) & 'variables.baseUrl = "http://localhost:8080";' & chr(10);
353353
content &= chr(9) & '}' & chr(10) & chr(10);
@@ -421,7 +421,7 @@ component aliases='wheels g test' extends="../base" {
421421
* Generate view test
422422
*/
423423
private function generateViewTest(required struct obj, required string viewName) {
424-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
424+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
425425
content &= chr(9) & 'function beforeAll() {' & chr(10);
426426
content &= chr(9) & chr(9) & 'variables.baseUrl = "http://localhost:8080";' & chr(10);
427427
content &= chr(9) & '}' & chr(10) & chr(10);
@@ -453,7 +453,7 @@ component aliases='wheels g test' extends="../base" {
453453
* Generate unit test
454454
*/
455455
private function generateUnitTest(required struct obj, boolean mock = false) {
456-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
456+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
457457
content &= chr(9) & 'function run() {' & chr(10) & chr(10);
458458
content &= chr(9) & chr(9) & 'describe("#obj.objectNameSingularC# Unit Tests", function() {' & chr(10) & chr(10);
459459

@@ -500,7 +500,7 @@ component aliases='wheels g test' extends="../base" {
500500
boolean crud = false,
501501
boolean factory = false
502502
) {
503-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
503+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
504504
content &= chr(9) & 'function beforeAll() {' & chr(10);
505505
content &= chr(9) & chr(9) & 'variables.baseUrl = "http://localhost:8080";' & chr(10);
506506
content &= chr(9) & '}' & chr(10) & chr(10);
@@ -558,7 +558,7 @@ component aliases='wheels g test' extends="../base" {
558558
boolean crud = false,
559559
boolean mock = false
560560
) {
561-
var content = 'component extends="wheels.Testbox" {' & chr(10) & chr(10);
561+
var content = 'component extends="wheels.WheelsTest" {' & chr(10) & chr(10);
562562
content &= chr(9) & 'function beforeAll() {' & chr(10);
563563
content &= chr(9) & chr(9) & 'variables.apiUrl = "http://localhost:8080/api";' & chr(10);
564564
content &= chr(9) & '}' & chr(10) & chr(10);

0 commit comments

Comments
 (0)