Skip to content

Commit fde1b95

Browse files
committed
finalized
1 parent 2bc1429 commit fde1b95

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

commands/coldbox/create/model.cfc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ component extends="coldbox-cli.models.BaseCommand" {
159159
if ( arguments.boxlang ) {
160160
modelContent = toBoxLangClass( modelContent );
161161
}
162+
162163
modelTestContent = replaceNoCase(
163164
modelTestContent,
164165
"|modelName|",

models/BaseCommand.cfc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ component accessors="true" {
77
property name="utility" inject="utility@coldbox-cli";
88
property name="settings" inject="box:modulesettings:coldbox-cli";
99
property name="config" inject="box:moduleconfig:coldbox-cli";
10+
property name="serverService" inject="serverService";
11+
property name="packageService" inject="PackageService";
1012

1113
function init(){
1214
return this;
@@ -75,10 +77,10 @@ component accessors="true" {
7577
}
7678

7779
function toBoxLangClass( required content ){
78-
return replaceNoCase(
80+
return reReplaceNoCase(
7981
arguments.content,
80-
"component ",
81-
"class",
82+
"component(\s|\n)?",
83+
"class #chr( 13 )#",
8284
"all"
8385
);
8486
}

templates/testing/ModelBDDContent.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ component
3131
describe( "|modelName| Suite", () => {
3232

3333
it( "can be created", () => {
34-
expect( model ).toBeComponent();
34+
expect( model ).notToBeNull()
3535
} )
3636

3737
|TestCases|

0 commit comments

Comments
 (0)