How to reuse a Test subspec with other subspecs of a podspec

28 views Asked by At

I have Pod named PodABC and it has multiple subspecs like SubspecA, SubspecB etc. There are corresponding test specs to the same like TestSubspecA, TestSubspecB etc. I want to have a common subspec(lets name it CommonSubspec) which will have all the mock, json files which needs to be used by test targets TestSubspecA, TestSubspecB etc.

If I am adding CommonSubspec as a dependency to TestSubspecA or TestSubspecB it throws the below error

^[[A[!] `PodABC/TestSubspecA (0.0.1)` depends upon `PodABC/CommonSubspec (0.0.1)`, which is a `test` spec.

Any suggestions on how to solve this problem please?

0

There are 0 answers