Commit debde386 authored by Orta's avatar Orta

Merge pull request #3808 from amorde/amorde-fix-specs-locations

[Specs] Fixed plugin specs in the incorrect files
parents 8b7690f7 c72e180d
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
module Pod module Pod
describe Installer::PreInstallHooksContext do describe Installer::PostInstallHooksContext do
it 'offers a convenience method to be generated' do it 'offers a convenience method to be generated' do
sandbox, podfile, lockfile = stub, stub, stub sandbox = stub(:root => '/path')
result = Installer::PreInstallHooksContext.generate(sandbox, podfile, lockfile) spec = fixture_spec('banana-lib/BananaLib.podspec')
result.class.should == Installer::PreInstallHooksContext target_definition = Podfile::TargetDefinition.new('Pods', nil)
result.sandbox.should == sandbox pod_target = PodTarget.new([spec], [target_definition], config.sandbox)
result.podfile.should == podfile umbrella = AggregateTarget.new(target_definition, config.sandbox)
result.lockfile.should == lockfile umbrella.user_project_path = '/path/project.xcodeproj'
umbrella.user_target_uuids = ['UUID']
umbrella.stubs(:platform).returns(Platform.new(:ios, '8.0'))
umbrella.pod_targets = [pod_target]
result = Installer::PostInstallHooksContext.generate(sandbox, [umbrella])
result.class.should == Installer::PostInstallHooksContext
result.sandbox_root.should == '/path'
result.umbrella_targets.count.should == 1
umbrella_target = result.umbrella_targets.first
umbrella_target.user_target_uuids.should == ['UUID']
umbrella_target.user_project_path.should == '/path/project.xcodeproj'
umbrella_target.specs.should == [spec]
umbrella_target.platform_name.should == :ios
umbrella_target.platform_deployment_target.should == '8.0'
umbrella_target.cocoapods_target_label.should == 'Pods'
end end
end end
end end
...@@ -2,30 +2,15 @@ ...@@ -2,30 +2,15 @@
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
module Pod module Pod
describe Installer::PostInstallHooksContext do describe Installer::PreInstallHooksContext do
it 'offers a convenience method to be generated' do it 'offers a convenience method to be generated' do
sandbox = stub(:root => '/path') sandbox, podfile, lockfile = stub, stub, stub
spec = fixture_spec('banana-lib/BananaLib.podspec') result = Installer::PreInstallHooksContext.generate(sandbox, podfile, lockfile)
target_definition = Podfile::TargetDefinition.new('Pods', nil) result.class.should == Installer::PreInstallHooksContext
pod_target = PodTarget.new([spec], [target_definition], config.sandbox) result.sandbox.should == sandbox
umbrella = AggregateTarget.new(target_definition, config.sandbox) result.podfile.should == podfile
umbrella.user_project_path = '/path/project.xcodeproj' result.lockfile.should == lockfile
umbrella.user_target_uuids = ['UUID']
umbrella.stubs(:platform).returns(Platform.new(:ios, '8.0'))
umbrella.pod_targets = [pod_target]
result = Installer::PostInstallHooksContext.generate(sandbox, [umbrella])
result.class.should == Installer::PostInstallHooksContext
result.sandbox_root.should == '/path'
result.umbrella_targets.count.should == 1
umbrella_target = result.umbrella_targets.first
umbrella_target.user_target_uuids.should == ['UUID']
umbrella_target.user_project_path.should == '/path/project.xcodeproj'
umbrella_target.specs.should == [spec]
umbrella_target.platform_name.should == :ios
umbrella_target.platform_deployment_target.should == '8.0'
umbrella_target.cocoapods_target_label.should == 'Pods'
end end
end end
end end
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