Commit c3118e94 authored by Boris Bügling's avatar Boris Bügling

Specs for #4004

parent 31ee00bb
......@@ -116,6 +116,7 @@ module Pod
end
it 'does not add an embed frameworks build phase if the target to integrate is a framework' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:framework)
@target_integrator.integrate!
......@@ -123,6 +124,33 @@ module Pod
phase.nil?.should == true
end
it 'adds an embed frameworks build phase if the target to integrate is an app extension' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:app_extension)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
phase.nil?.should == false
end
it 'adds an embed frameworks build phase if the target to integrate is a watch extension' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:watch_extension)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
phase.nil?.should == false
end
it 'adds an embed frameworks build phase if the target to integrate is a watchOS 2 extension' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:watch2_extension)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
phase.nil?.should == false
end
it 'removes existing embed frameworks build phases from integrated framework targets' do
@pod_bundle.stubs(:requires_frameworks? => true)
@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