Commit 3227fa60 authored by Samuel Giddins's avatar Samuel Giddins Committed by GitHub

Merge pull request #5503 from DanToml/dan_uitests_embed

[Installer] Embed Pods Frameworks in UI Tests
parents d6bf4794 ba45bf7e
...@@ -47,6 +47,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -47,6 +47,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Juan Civile](https://github.com/champo) [Juan Civile](https://github.com/champo)
[#5362](https://github.com/CocoaPods/CocoaPods/issues/5362) [#5362](https://github.com/CocoaPods/CocoaPods/issues/5362)
* Fix embedding frameworks in UI Testing bundles.
[Daniel Tomlinson](https://github.com/dantoml)
[#5250](https://github.com/CocoaPods/CocoaPods/issues/5250)
## 1.0.1 (2016-06-02) ## 1.0.1 (2016-06-02)
......
...@@ -20,7 +20,7 @@ module Pod ...@@ -20,7 +20,7 @@ module Pod
# @return [Array<Symbol>] the symbol types, which require that the pod # @return [Array<Symbol>] the symbol types, which require that the pod
# frameworks are embedded in the output directory / product bundle. # frameworks are embedded in the output directory / product bundle.
# #
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :app_extension, :watch_extension, :watch2_extension].freeze EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :ui_test_bundle, :app_extension, :watch_extension, :watch2_extension].freeze
# @return [String] the name of the embed frameworks phase # @return [String] the name of the embed frameworks phase
# #
......
...@@ -174,6 +174,15 @@ module Pod ...@@ -174,6 +174,15 @@ module Pod
phase.nil?.should == false phase.nil?.should == false
end end
it 'adds an embed frameworks build phase if the target to integrate is a UI Test bundle' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:ui_test_bundle)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == @embed_framework_phase_name }
phase.nil?.should == false
end
it 'does not remove existing embed frameworks build phases from integrated framework targets' do it 'does not remove existing embed frameworks build phases from integrated framework targets' do
@pod_bundle.stubs(:requires_frameworks? => true) @pod_bundle.stubs(:requires_frameworks? => true)
@target_integrator.integrate! @target_integrator.integrate!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment