@@ -68,32 +68,34 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenFileAlreadyExists_doNothing(
6868 assert_equal ( Pod ::Executable . executed_commands . length , 0 )
6969 end
7070
71- def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_raiseError ( )
71+ def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_dontBuildCodegen ( )
7272
7373 # Arrange
7474 FileMock . mocked_existing_files ( [
7575 @base_path + "/build/" + @third_party_provider_implementation ,
7676 ] )
7777
7878 # Act
79- assert_raise {
79+ assert_nothing_raised {
8080 checkAndGenerateEmptyThirdPartyProvider! ( @prefix , false , dir_manager : DirMock , file_manager : FileMock )
8181 }
8282
8383 # Assert
8484 assert_equal ( Pathname . pwd_invocation_count , 1 )
8585 assert_equal ( Pod ::Config . instance . installation_root . relative_path_from_invocation_count , 1 )
8686 assert_equal ( FileMock . exist_invocation_params , [
87- @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header
87+ @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header ,
88+ @base_path + "/" + @prefix + "/React/Fabric/tmpSchemaList.txt" ,
8889 ] )
8990 assert_equal ( DirMock . exist_invocation_params , [
9091 @base_path + "/" + @prefix + "/../react-native-codegen" ,
91- @base_path + "/" + @prefix + "/../@react-native/codegen" ,
9292 ] )
93- assert_equal ( Pod ::UI . collected_messages , [ ] )
93+ assert_equal ( Pod ::UI . collected_messages , [
94+ "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider" ,
95+ ] )
9496 assert_equal ( $collected_commands, [ ] )
95- assert_equal ( FileMock . open_files . length , 0 )
96- assert_equal ( Pod ::Executable . executed_commands . length , 0 )
97+ assert_equal ( FileMock . open_files . length , 1 )
98+ assert_equal ( Pod ::Executable . executed_commands . length , 1 )
9799 end
98100
99101 def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCodegenrepoExists_dontBuildCodegen ( )
@@ -145,7 +147,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCode
145147
146148 def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen ( )
147149 # Arrange
148- codegen_cli_path = @base_path + "/" + @prefix + "/../@ react-native/ codegen"
150+ codegen_cli_path = @base_path + "/" + @prefix + "/../react-native- codegen"
149151 DirMock . mocked_existing_dirs ( [
150152 codegen_cli_path ,
151153 ] )
@@ -160,15 +162,14 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen()
160162 @base_path + "/" + @prefix + "/React/Fabric/" + @tmp_schema_list_file
161163 ] )
162164 assert_equal ( DirMock . exist_invocation_params , [
163- @base_path + "/" + @prefix + "/../react-native-codegen" ,
164165 codegen_cli_path ,
165166 codegen_cli_path + "/lib" ,
166167 ] )
167168 assert_equal ( Pod ::UI . collected_messages , [
168- "[Codegen] building #{ codegen_cli_path } . " ,
169+ "[Codegen] building #{ codegen_cli_path } " ,
169170 "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider"
170171 ] )
171- assert_equal ( $collected_commands, [ "~/app/ios/../../../@ react-native/ codegen/scripts/oss/build.sh" ] )
172+ assert_equal ( $collected_commands, [ "~/app/ios/../../../react-native- codegen/scripts/oss/build.sh" ] )
172173 assert_equal ( FileMock . open_files [ 0 ] . collected_write , [ "[]" ] )
173174 assert_equal ( FileMock . open_files [ 0 ] . fsync_invocation_count , 1 )
174175 assert_equal ( Pod ::Executable . executed_commands [ 0 ] , {
@@ -185,7 +186,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen()
185186 def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buildCodegen ( )
186187 # Arrange
187188 rn_path = 'packages/react-native'
188- codegen_cli_path = rn_path + "/../@ react-native/ codegen"
189+ codegen_cli_path = rn_path + "/../react-native- codegen"
189190 DirMock . mocked_existing_dirs ( [
190191 @base_path + "/" + codegen_cli_path ,
191192 ] )
@@ -201,15 +202,16 @@ def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buil
201202 @base_path + "/" + rn_path + "/React/Fabric/" + @tmp_schema_list_file
202203 ] )
203204 assert_equal ( DirMock . exist_invocation_params , [
204- @base_path + "/" + rn_path + "/../react-native-codegen" ,
205205 @base_path + "/" + codegen_cli_path ,
206206 @base_path + "/" + codegen_cli_path + "/lib" ,
207207 ] )
208208 assert_equal ( Pod ::UI . collected_messages , [
209- "[Codegen] building #{ @base_path + "/" + codegen_cli_path } . " ,
209+ "[Codegen] building #{ @base_path + "/" + codegen_cli_path } " ,
210210 "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider"
211211 ] )
212- assert_equal ( $collected_commands, [ @base_path + "/" + rn_path + "/../@react-native/codegen/scripts/oss/build.sh" ] )
212+ assert_equal ( $collected_commands, [
213+ @base_path + "/" + rn_path + "/../react-native-codegen/scripts/oss/build.sh" ,
214+ ] )
213215 assert_equal ( FileMock . open_files [ 0 ] . collected_write , [ "[]" ] )
214216 assert_equal ( FileMock . open_files [ 0 ] . fsync_invocation_count , 1 )
215217 assert_equal ( Pod ::Executable . executed_commands [ 0 ] , {
0 commit comments