CocoaPods: The Elegant Solution To Installing The Same Pod In Multiple Targets →

The Elegant Solution
So I went to straight to the expert – Core Contributor to CocoaPods @NeoNacho, who pointed me to the following elegant solution:

# Podfile

platform :ios, '9.0'

use_frameworks!

# My other pods

def testing_pods
    pod 'Quick', '0.5.0'
    pod 'Nimble', '2.0.0-rc.1'
end

target 'MyTests' do
    testing_pods
end

target 'MyUITests' do
    testing_pods
end