55 parseVersion ,
66 release ,
77 updateDefaultHtml ,
8- updateGemBuildWorkflow ,
98 updateGemspec ,
109 updatePackageJson ,
1110 updatePackageLockJson ,
@@ -109,30 +108,13 @@ describe('release.ts', () => {
109108 } ) ;
110109 } ) ;
111110
112- describe ( 'updateGemBuildWorkflow()' , ( ) => {
113- test ( 'replaces version in gem install command' , ( ) => {
114- const content = 'gem install type-on-strap --version "2.4.11" --source "https://rubygems.pkg.github.com/sylhare"\n' ;
115- jest . spyOn ( fs , 'readFileSync' ) . mockReturnValue ( content as any ) ;
116- const write = jest . spyOn ( fs , 'writeFileSync' ) . mockImplementation ( ( ) => {
117- } ) ;
118-
119- updateGemBuildWorkflow ( '/fake/.github/workflows/gem-build.yml' , '2.6.0' ) ;
120-
121- expect ( write ) . toHaveBeenCalledWith (
122- '/fake/.github/workflows/gem-build.yml' ,
123- 'gem install type-on-strap --version "2.6.0" --source "https://rubygems.pkg.github.com/sylhare"\n'
124- ) ;
125- } ) ;
126- } ) ;
127-
128111 describe ( 'release()' , ( ) => {
129112 test ( 'calls all updaters and logs the new version' , ( ) => {
130113 const current = '2.4.11' ;
131114 jest . spyOn ( fs , 'readFileSync' ) . mockImplementation ( ( filePath : unknown ) => {
132115 const p = filePath as string ;
133116 if ( p . endsWith ( '.gemspec' ) ) return `spec.version = "${ current } "` as any ;
134117 if ( p . endsWith ( 'default.html' ) ) return `Type on Strap jekyll theme v${ current } ` as any ;
135- if ( p . endsWith ( 'gem-build.yml' ) ) return `gem install type-on-strap --version "${ current } "` as any ;
136118 return `{"version":"${ current } ","packages":{"":{"version":"${ current } "}}}` as any ;
137119 } ) ;
138120 jest . spyOn ( fs , 'writeFileSync' ) . mockImplementation ( ( ) => {
@@ -146,7 +128,6 @@ describe('release.ts', () => {
146128 expect ( fs . writeFileSync ) . toHaveBeenCalledWith ( expect . stringContaining ( 'default.html' ) , expect . any ( String ) ) ;
147129 expect ( fs . writeFileSync ) . toHaveBeenCalledWith ( expect . stringContaining ( 'package.json' ) , expect . any ( String ) ) ;
148130 expect ( fs . writeFileSync ) . toHaveBeenCalledWith ( expect . stringContaining ( 'package-lock.json' ) , expect . any ( String ) ) ;
149- expect ( fs . writeFileSync ) . toHaveBeenCalledWith ( expect . stringContaining ( 'gem-build.yml' ) , expect . any ( String ) ) ;
150131 } ) ;
151132 } ) ;
152133} ) ;
0 commit comments