@@ -23,7 +23,7 @@ pub fn cmd_new(name: String, format: Option<FileFormat>) -> Result<()> {
2323 } ;
2424
2525 let schema_url = schema_url_for ( format) ;
26- let path = dir. join ( format ! ( "{name}.{ext}" ) ) ;
26+ let path = dir. join ( format ! ( "{name}.vespertide. {ext}" ) ) ;
2727 if path. exists ( ) {
2828 bail ! ( "model file already exists: {}" , path. display( ) ) ;
2929 }
@@ -134,7 +134,7 @@ mod tests {
134134 cmd_new ( "users" . into ( ) , None ) . unwrap ( ) ;
135135
136136 let cfg = VespertideConfig :: default ( ) ;
137- let path = cfg. models_dir ( ) . join ( "users.json" ) ;
137+ let path = cfg. models_dir ( ) . join ( "users.vespertide. json" ) ;
138138 assert ! ( path. exists( ) ) ;
139139
140140 let text = fs:: read_to_string ( path) . unwrap ( ) ;
@@ -159,7 +159,7 @@ mod tests {
159159 model_format : FileFormat :: Yaml ,
160160 ..VespertideConfig :: default ( )
161161 } ;
162- let path = cfg. models_dir ( ) . join ( "orders.yaml" ) ;
162+ let path = cfg. models_dir ( ) . join ( "orders.vespertide. yaml" ) ;
163163 assert ! ( path. exists( ) ) ;
164164
165165 let text = fs:: read_to_string ( path) . unwrap ( ) ;
@@ -185,7 +185,7 @@ mod tests {
185185 model_format : FileFormat :: Yml ,
186186 ..VespertideConfig :: default ( )
187187 } ;
188- let path = cfg. models_dir ( ) . join ( "products.yml" ) ;
188+ let path = cfg. models_dir ( ) . join ( "products.vespertide. yml" ) ;
189189 assert ! ( path. exists( ) ) ;
190190
191191 let text = fs:: read_to_string ( path) . unwrap ( ) ;
@@ -206,12 +206,12 @@ mod tests {
206206
207207 let cfg = VespertideConfig :: default ( ) ;
208208 std:: fs:: create_dir_all ( cfg. models_dir ( ) ) . unwrap ( ) ;
209- let path = cfg. models_dir ( ) . join ( "users.json" ) ;
209+ let path = cfg. models_dir ( ) . join ( "users.vespertide. json" ) ;
210210 std:: fs:: write ( & path, "{}" ) . unwrap ( ) ;
211211
212212 let err = cmd_new ( "users" . into ( ) , None ) . unwrap_err ( ) ;
213213 let msg = err. to_string ( ) ;
214214 assert ! ( msg. contains( "model file already exists" ) ) ;
215- assert ! ( msg. contains( "users.json" ) ) ;
215+ assert ! ( msg. contains( "users.vespertide. json" ) ) ;
216216 }
217217}
0 commit comments