@@ -112,11 +112,12 @@ def test_react_native_pods
112112 assert_nil ( resources_pod ( Pathname . new ( '/' ) , target ) )
113113 assert_nil ( resources_pod ( Pathname . new ( '.' ) , target ) )
114114
115- assert_nil ( resources_pod ( fixture_path ( 'without_resources' ) , target ) )
116- assert_nil ( resources_pod ( fixture_path ( 'without_resources' , target . to_s ) , target ) )
115+ assert_equal ( '.' , resources_pod ( fixture_path ( 'without_resources' ) , target ) )
116+ assert_equal ( '..' , resources_pod ( fixture_path ( 'without_resources' , target . to_s ) , target ) )
117117
118- assert_nil ( resources_pod ( fixture_path ( 'without_platform_resources' ) , target ) )
119- assert_nil ( resources_pod ( fixture_path ( 'without_platform_resources' , target . to_s ) , target ) )
118+ assert_equal ( '.' , resources_pod ( fixture_path ( 'without_platform_resources' ) , target ) )
119+ assert_equal ( '..' ,
120+ resources_pod ( fixture_path ( 'without_platform_resources' , target . to_s ) , target ) )
120121
121122 assert_equal ( '.' , resources_pod ( fixture_path ( 'with_resources' ) , target ) )
122123 assert_equal ( '..' , resources_pod ( fixture_path ( 'with_resources' , target . to_s ) , target ) )
@@ -129,25 +130,30 @@ def test_react_native_pods
129130
130131 %i[ ios macos ] . each do |target |
131132 define_method ( "test_#{ target } _resources_pod_writes_podspec" ) do
132- resources = %w[ dist/assets dist/main.jsbundle ]
133- platform_resources = [ "dist-#{ target } /assets" , "dist-#{ target } /main.jsbundle" ]
133+ resources = %w[ app.json dist/assets dist/main.jsbundle ]
134+ platform_resources = [ 'app.json' , "dist-#{ target } /assets" , "dist-#{ target } /main.jsbundle" ]
134135
135136 [
136- fixture_path ( 'with_resources' ) ,
137- fixture_path ( 'with_resources' , target . to_s ) ,
138137 fixture_path ( 'with_platform_resources' ) ,
139138 fixture_path ( 'with_platform_resources' , target . to_s ) ,
139+ fixture_path ( 'with_resources' ) ,
140+ fixture_path ( 'with_resources' , target . to_s ) ,
141+ fixture_path ( 'without_platform_resources' ) ,
142+ fixture_path ( 'without_platform_resources' , target . to_s ) ,
143+ fixture_path ( 'without_resources' ) ,
144+ fixture_path ( 'without_resources' , target . to_s ) ,
140145 ] . each do |project_root |
141146 podspec_path = resources_pod ( project_root , target )
142147 manifest_path = app_manifest_path ( project_root , podspec_path )
143148 manifest = JSON . parse ( File . read ( manifest_path ) )
144149
145- if project_root . to_s . include? ( 'with_platform_resources' )
150+ if project_root . to_s . include? ( 'without' )
151+ assert_equal ( [ 'app.json' ] , manifest [ 'resources' ] )
152+ elsif project_root . to_s . include? ( 'with_platform_resources' )
146153 assert_equal ( platform_resources , manifest [ 'resources' ] . sort )
147154 else
148155 assert_equal ( resources , manifest [ 'resources' ] . sort )
149156 end
150-
151157 ensure
152158 File . delete ( manifest_path )
153159 end
0 commit comments