Commit 921492d5 authored by Samuel E. Giddins's avatar Samuel E. Giddins Committed by Samuel Giddins

Introduce new Podfile DSL

wip

get tests passing

[Gemfile] Point to git for Core
parent 71ce9d47
......@@ -17,7 +17,7 @@ gem 'json', :git => 'https://github.com/segiddins/json.git', :branch => 'seg-1.7
group :development do
cp_gem 'claide', 'CLAide'
cp_gem 'cocoapods-core', 'Core'
cp_gem 'cocoapods-core', 'Core', 'seg-podfile-refactor'
cp_gem 'cocoapods-deintegrate', 'cocoapods-deintegrate'
cp_gem 'cocoapods-downloader', 'cocoapods-downloader'
cp_gem 'cocoapods-plugins', 'cocoapods-plugins'
......
......@@ -7,8 +7,8 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 0851a1e712e1e1c206ed03f67a25ef28af52fa69
branch: master
revision: 3114804fac0ab28cd17ceb7d6fc29d0ca9c88e6e
branch: seg-podfile-refactor
specs:
cocoapods-core (0.39.0)
activesupport (>= 4.0.2)
......
......@@ -87,15 +87,9 @@ module Pod
#---------------------------------------------------------------------#
private
protected
# Add build settings, which ensure that the pod targets can be imported
# from the integrating target by all sort of imports, which are:
# - `#import <…>`
# - `#import "…"`
# - `@import …;` / `import …`
#
def generate_settings_to_import_pod_targets
def settings_to_import_pod_targets
if target.requires_frameworks?
framework_header_search_paths = pod_targets.select(&:should_build?).map do |target|
if target.scoped?
......@@ -118,17 +112,32 @@ module Pod
if pod_targets.any? { |t| t.should_build? && t.scoped? }
build_settings['FRAMEWORK_SEARCH_PATHS'] = '"$PODS_FRAMEWORK_BUILD_PATH"'
end
@xcconfig.merge!(build_settings)
build_settings
else
# Make headers discoverable from $PODS_ROOT/Headers directory
header_search_paths = target.sandbox.public_headers.search_paths(target.platform)
build_settings = {
{
# by `#import "…"`
'HEADER_SEARCH_PATHS' => '$(inherited) ' + XCConfigHelper.quote(header_search_paths),
# by `#import <…>`
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(header_search_paths, '-isystem'),
}
@xcconfig.merge!(build_settings)
end
end
private
# Add build settings, which ensure that the pod targets can be imported
# from the integrating target by all sort of imports, which are:
# - `#import <…>`
# - `#import "…"`
# - `@import …;` / `import …`
#
def generate_settings_to_import_pod_targets
@xcconfig.merge!(settings_to_import_pod_targets)
target.search_paths_aggregate_targets.each do |search_paths_target|
generator = AggregateXCConfig.new(search_paths_target, configuration_name)
@xcconfig.merge!(generator.settings_to_import_pod_targets)
end
end
......
......@@ -225,9 +225,14 @@ module Pod
#
def generate_targets
pod_targets = generate_pod_targets(result.specs_by_target)
result.specs_by_target.map do |target_definition, _|
aggregate_targets = result.specs_by_target.keys.reject(&:abstract?).map do |target_definition|
generate_target(target_definition, pod_targets)
end
aggregate_targets.each do |target|
target.search_paths_aggregate_targets = aggregate_targets.select do |aggregate_target|
target.target_definition.targets_to_inherit_search_paths.include?(aggregate_target.target_definition)
end
end
end
# Setup the aggregate target for a single user target
......@@ -246,6 +251,7 @@ module Pod
if config.integrate_targets?
target_inspection = result.target_inspections[target_definition]
raise "missing inspection: #{target_definition.name}" unless target_inspection
target.user_project = target_inspection.project
target.client_root = target.user_project_path.dirname.realpath
target.user_target_uuids = target_inspection.project_target_uuids
......@@ -665,8 +671,9 @@ module Pod
inspection_result = {}
UI.section 'Inspecting targets to integrate' do
inspectors = podfile.target_definition_list.map do |target_definition|
next if target_definition.abstract?
TargetInspector.new(target_definition, config.installation_root)
end
end.compact
inspectors.group_by(&:compute_project_path).each do |project_path, target_inspectors|
project = Xcodeproj::Project.open(project_path)
target_inspectors.each do |inspector|
......
......@@ -102,18 +102,9 @@ module Pod
#
def compute_targets(user_project)
native_targets = user_project.native_targets
if link_with = target_definition.link_with
targets = native_targets.select { |t| link_with.include?(t.name) }
raise Informative, "Unable to find the targets named #{link_with.map { |x| "`#{x}`" }.to_sentence}" \
"to link with target definition `#{target_definition.name}`" if targets.empty?
elsif target_definition.link_with_first_target?
targets = [native_targets.first].compact
raise Informative, 'Unable to find a target' if targets.empty?
else
target = native_targets.find { |t| t.name == target_definition.name.to_s }
targets = [target].compact
raise Informative, "Unable to find a target named `#{target_definition.name}`" if targets.empty?
end
target = native_targets.find { |t| t.name == target_definition.name.to_s }
targets = [target].compact
raise Informative, "Unable to find a target named `#{target_definition.name}`" if targets.empty?
targets
end
......
......@@ -27,6 +27,7 @@ module Pod
#
def validate
validate_pod_directives
validate_no_abstract_only_pods!
@validated = true
end
......@@ -38,7 +39,7 @@ module Pod
def valid?
validate unless @validated
@validated && errors.size == 0
@validated && errors.empty?
end
# A message describing any errors in the
......@@ -81,6 +82,22 @@ module Pod
' download strategies. This is not allowed'
end
end
def validate_no_abstract_only_pods!
abstract_pods = ->(target_definition) do
if !target_definition.abstract? || !target_definition.children.empty?
target_definition.children.flat_map do |td|
abstract_pods[td]
end
else
target_definition.dependencies
end
end
pods = podfile.root_target_definitions.flat_map(&abstract_pods).uniq
pods.each do |pod|
add_error "The dependency `#{pod}` is not used in any concrete target."
end
end
end
end
end
......@@ -17,6 +17,7 @@ module Pod
@target_definition = target_definition
@sandbox = sandbox
@pod_targets = []
@search_paths_aggregate_targets = []
@file_accessors = []
@xcconfigs = {}
end
......@@ -103,6 +104,8 @@ module Pod
#
attr_accessor :pod_targets
attr_accessor :search_paths_aggregate_targets
# @param [String] build_configuration The build configuration for which the
# the pod targets should be returned.
#
......
......@@ -665,12 +665,14 @@ module Pod
urls = source_urls
Pod::Podfile.new do
urls.each { |u| source(u) }
use_frameworks!(use_frameworks)
platform(platform_name, deployment_target)
if local
pod name, :path => podspec.dirname.to_s
else
pod name, :podspec => podspec.to_s
target 'App' do
use_frameworks!(use_frameworks)
platform(platform_name, deployment_target)
if local
pod name, :path => podspec.dirname.to_s
else
pod name, :podspec => podspec.to_s
end
end
end
end
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
//
// SampleProjectTests.m
// SampleProjectTests
//
// Created by Samuel Giddins on 9/7/15.
// Copyright © 2015 LJR Software Limited. All rights reserved.
//
#import <XCTest/XCTest.h>
@interface SampleProjectTests : XCTestCase
@end
@implementation SampleProjectTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
......@@ -58,8 +58,7 @@ module Pod
describe '#compute_targets' do
it 'returns the targets specified in the target definition' do
target_definition = Podfile::TargetDefinition.new(:default, nil)
target_definition.link_with = ['UserTarget']
target_definition = Podfile::TargetDefinition.new('UserTarget', nil)
user_project = Xcodeproj::Project.new('path')
user_project.new_target(:application, 'FirstTarget', :ios)
user_project.new_target(:application, 'UserTarget', :ios)
......@@ -70,13 +69,12 @@ module Pod
end
it 'raises if it is unable to find the targets specified by the target definition' do
target_definition = Podfile::TargetDefinition.new(:default, nil)
target_definition.link_with = %w(UserTarget AnotherUserTarget)
target_definition = Podfile::TargetDefinition.new('UserTarget', nil)
user_project = Xcodeproj::Project.new('path')
target_inspector = TargetInspector.new(target_definition, config.installation_root)
e = lambda { target_inspector.send(:compute_targets, user_project) }.should.raise Informative
e.message.should.match /Unable to find the targets named `UserTarget` and `AnotherUserTarget`/
e.message.should.match /Unable to find a target named `UserTarget`/
end
it 'returns the target with the same name of the target definition' do
......@@ -98,27 +96,6 @@ module Pod
e = lambda { target_inspector.send(:compute_targets, user_project) }.should.raise Informative
e.message.should.match /Unable to find a target named/
end
it 'returns the first target of the project if the target definition is named default' do
target_definition = Podfile::TargetDefinition.new('Pods', nil)
target_definition.link_with_first_target = true
user_project = Xcodeproj::Project.new('path')
user_project.new_target(:application, 'FirstTarget', :ios)
user_project.new_target(:application, 'UserTarget', :ios)
target_inspector = TargetInspector.new(target_definition, config.installation_root)
targets = target_inspector.send(:compute_targets, user_project)
targets.map(&:name).should == ['FirstTarget']
end
it 'raises if the default target definition cannot be linked because there are no user targets' do
target_definition = Podfile::TargetDefinition.new(:default, nil)
user_project = Xcodeproj::Project.new('path')
target_inspector = TargetInspector.new(target_definition, config.installation_root)
e = lambda { target_inspector.send(:compute_targets, user_project) }.should.raise Informative
e.message.should.match /Unable to find a target/
end
end
#--------------------------------------#
......
......@@ -7,14 +7,19 @@ module Pod
@podfile = Pod::Podfile.new do
platform :ios, '6.0'
xcodeproj 'SampleProject/SampleProject'
pod 'JSONKit', '1.5pre'
pod 'AFNetworking', '1.0.1'
pod 'SVPullToRefresh', '0.4'
pod 'libextobjc/EXTKeyPathCoding', '0.2.3'
target 'TestRunner' do
target 'SampleProject' do
pod 'JSONKit', '1.5pre'
pod 'AFNetworking', '1.0.1'
pod 'SVPullToRefresh', '0.4'
pod 'libextobjc/EXTKeyPathCoding', '0.2.3'
pod 'libextobjc/EXTSynthesize', '0.2.3'
target 'TestRunner' do
inherit! :search_paths
pod 'libextobjc/EXTKeyPathCoding', '0.2.3'
pod 'libextobjc/EXTSynthesize', '0.2.3'
end
end
end
......@@ -131,9 +136,9 @@ module Pod
'JSONKit',
'AFNetworking',
'SVPullToRefresh',
'Pods-libextobjc',
'Pods-SampleProject-libextobjc',
].sort
target.support_files_dir.should == config.sandbox.target_support_files_dir('Pods')
target.support_files_dir.should == config.sandbox.target_support_files_dir('Pods-SampleProject')
target.pod_targets.map(&:archs).uniq.should == [[]]
......@@ -187,22 +192,24 @@ module Pod
source SpecHelper.test_repo_url
platform :ios, '6.0'
xcodeproj 'SampleProject/SampleProject'
pod 'BananaLib'
pod 'monkey'
target 'TestRunner' do
target 'SampleProject' do
pod 'BananaLib'
pod 'monkey'
target 'TestRunner' do
pod 'BananaLib'
pod 'monkey'
end
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
analyzer.analyze
analyzer.analyze.targets.flat_map { |at| at.pod_targets.map { |pt| "#{at.name}/#{pt.name}" } }.sort.should == %w(
Pods/BananaLib
Pods/monkey
Pods-TestRunner/BananaLib
Pods-TestRunner/monkey
Pods-SampleProject-TestRunner/BananaLib
Pods-SampleProject-TestRunner/monkey
Pods-SampleProject/BananaLib
Pods-SampleProject/monkey
).sort
end
......@@ -214,9 +221,11 @@ module Pod
pod 'BananaLib'
pod 'monkey'
target 'TestRunner' do
pod 'BananaLib'
pod 'monkey'
target 'SampleProject' do
target 'TestRunner' do
pod 'BananaLib'
pod 'monkey'
end
end
target 'CLITool' do
......@@ -228,11 +237,11 @@ module Pod
analyzer.analyze
analyzer.analyze.targets.flat_map { |at| at.pod_targets.map { |pt| "#{at.name}/#{pt.name}" } }.sort.should == %w(
Pods/Pods-BananaLib
Pods/Pods-monkey
Pods-TestRunner/Pods-TestRunner-BananaLib
Pods-TestRunner/Pods-TestRunner-monkey
Pods-CLITool/Pods-CLITool-monkey
Pods-SampleProject-TestRunner/Pods-SampleProject-TestRunner-BananaLib
Pods-SampleProject-TestRunner/Pods-SampleProject-TestRunner-monkey
Pods-SampleProject/Pods-SampleProject-BananaLib
Pods-SampleProject/Pods-SampleProject-monkey
).sort
end
end
......@@ -335,8 +344,10 @@ module Pod
podfile = Podfile.new do
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
pod 'AFNetworking'
pod 'AFNetworkActivityLogger'
target 'SampleProject' do
pod 'AFNetworking'
pod 'AFNetworkActivityLogger'
end
end
hash = {}
hash['PODS'] = [
......@@ -367,7 +378,9 @@ module Pod
podfile = Podfile.new do
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
pod 'ARAnalytics/Mixpanel'
target 'SampleProject' do
pod 'ARAnalytics/Mixpanel'
end
end
hash = {}
hash['PODS'] = ['ARAnalytics/CoreIOS (2.8.0)', { 'ARAnalytics/Mixpanel (2.8.0)' => ['ARAnlytics/CoreIOS', 'Mixpanel'] }, 'Mixpanel (2.5.1)']
......@@ -454,9 +467,6 @@ module Pod
'libextobjc/EXTKeyPathCoding (0.2.3)',
]
@analyzer.analyze.targets[1].pod_targets.map(&:specs).flatten.map(&:to_s).should == [
'AFNetworking (1.0.1)',
'JSONKit (1.5pre)',
'SVPullToRefresh (0.4)',
'libextobjc/EXTKeyPathCoding (0.2.3)',
'libextobjc/EXTSynthesize (0.2.3)',
]
......@@ -469,8 +479,10 @@ module Pod
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'SampleProject/SampleProject'
platform :ios, '8.0'
pod 'RestKit', '~> 0.23.0'
pod 'RestKit', '<= 0.23.2'
target 'SampleProject' do
pod 'RestKit', '~> 0.23.0'
pod 'RestKit', '<= 0.23.2'
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
analyzer.analyze
......@@ -542,8 +554,10 @@ module Pod
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'SampleProject/SampleProject'
platform :ios
pod 'SEGModules', :git => 'https://github.com/segiddins/SEGModules.git'
pod 'SEGModules', :git => 'https://github.com/segiddins/Modules.git'
target 'SampleProject' do
pod 'SEGModules', :git => 'https://github.com/segiddins/SEGModules.git'
pod 'SEGModules', :git => 'https://github.com/segiddins/Modules.git'
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
e = should.raise(Informative) { analyzer.analyze }
......@@ -559,8 +573,10 @@ module Pod
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'SampleProject/SampleProject'
platform :ios
pod 'RestKit/Core', :git => 'https://github.com/RestKit/RestKit.git'
pod 'RestKit', :git => 'https://github.com/segiddins/RestKit.git'
target 'SampleProject' do
pod 'RestKit/Core', :git => 'https://github.com/RestKit/RestKit.git'
pod 'RestKit', :git => 'https://github.com/segiddins/RestKit.git'
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
e = should.raise(Informative) { analyzer.analyze }
......@@ -576,8 +592,10 @@ module Pod
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'SampleProject/SampleProject'
platform :ios
pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git'
pod 'RestKit', '~> 0.23.0'
target 'SampleProject' do
pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git'
pod 'RestKit', '~> 0.23.0'
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
e = should.raise(Informative) { analyzer.analyze }
......@@ -591,7 +609,9 @@ module Pod
describe 'using lockfile checkout options' do
before do
@podfile = Pod::Podfile.new do
pod 'BananaLib', :git => 'example.com'
target 'SampleProject' do
pod 'BananaLib', :git => 'example.com'
end
end
@dependency = @podfile.dependencies.first
......
......@@ -5,6 +5,7 @@ module Pod
describe 'podspec/path in combination with other download strategies' do
it 'validates that podspec is not used in combination with other download strategies' do
podfile = Pod::Podfile.new do
abstract!(false)
pod 'JSONKit', :podspec => 'https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/JSONKit/1.5pre/JSONKit.podspec.json',
:git => 'git@github.com:johnezang/JSONKit.git'
end
......@@ -19,6 +20,7 @@ module Pod
it 'validates that path is not used in combination with other download strategies' do
podfile = Pod::Podfile.new do
abstract!(false)
pod 'JSONKit', :path => './JSONKit/1.5pre/JSONKit.podspec.json',
:git => 'git@github.com:johnezang/JSONKit.git'
end
......@@ -33,6 +35,7 @@ module Pod
it 'validates when calling `valid?` before calling `validate`' do
podfile = Pod::Podfile.new do
abstract!(false)
pod 'JSONKit', :path => './JSONKit/1.5pre/JSONKit.podspec.json',
:git => 'git@github.com:johnezang/JSONKit.git'
end
......@@ -47,6 +50,7 @@ module Pod
describe 'multiple download strategies' do
it 'validates that only one download strategy is specified' do
podfile = Pod::Podfile.new do
abstract!(false)
pod 'JSONKit', :svn => 'svn.example.com/JSONKit',
:git => 'git@github.com:johnezang/JSONKit.git'
end
......
......@@ -19,7 +19,12 @@ def generate_podfile(pods = ['JSONKit'])
Pod::Podfile.new do
platform :ios
xcodeproj SpecHelper.fixture('SampleProject/SampleProject'), 'Test' => :debug, 'App Store' => :release
pods.each { |name| pod name }
target 'SampleProject' do
pods.each { |name| pod name }
target 'SampleProjectTests' do
inherit! :search_paths
end
end
end
end
......@@ -29,7 +34,12 @@ def generate_local_podfile
Pod::Podfile.new do
platform :ios
xcodeproj SpecHelper.fixture('SampleProject/SampleProject'), 'Test' => :debug, 'App Store' => :release
pod 'Reachability', :path => SpecHelper.fixture('integration/Reachability')
target 'SampleProject' do
pod 'Reachability', :path => SpecHelper.fixture('integration/Reachability')
target 'SampleProjectTests' do
inherit! :search_paths
end
end
end
end
......@@ -226,7 +236,9 @@ module Pod
pod 'OrangeFramework', :path => (fixture_path + 'orange-framework').to_s
pod 'monkey', :path => (fixture_path + 'monkey').to_s
target 'TestRunner', :exclusive => true do
target 'SampleProject'
target 'TestRunner' do
inherit! :search_paths
pod 'monkey', :path => (fixture_path + 'monkey').to_s
end
end
......@@ -262,6 +274,7 @@ module Pod
pod 'BananaLib', :path => (fixture_path + 'banana-lib').to_s
pod 'OrangeFramework', :path => (fixture_path + 'orange-framework').to_s
pod 'monkey', :path => (fixture_path + 'monkey').to_s
target 'SampleProject'
end
lockfile = generate_lockfile
config.integrate_targets = false
......@@ -304,6 +317,7 @@ module Pod
pod 'BananaLib', :path => (fixture_path + 'banana-lib').to_s
pod 'OrangeFramework', :path => (fixture_path + 'orange-framework').to_s
pod 'monkey', :path => (fixture_path + 'monkey').to_s
target 'SampleProject'
end
@lockfile = generate_lockfile
......@@ -345,6 +359,7 @@ module Pod
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
pod 'OrangeFramework', :path => (fixture_path + 'orange-framework').to_s
target 'SampleProject'
end
lockfile = generate_lockfile
config.integrate_targets = false
......@@ -387,7 +402,7 @@ module Pod
it 'stores the targets created by the analyzer' do
@installer.send(:analyze)
@installer.aggregate_targets.map(&:name).sort.should == ['Pods']
@installer.aggregate_targets.map(&:name).sort.should == ["Pods-SampleProject", "Pods-SampleProjectTests"]
@installer.pod_targets.map(&:name).sort.should == ['JSONKit']
end
......@@ -395,7 +410,7 @@ module Pod
@installer.update = true
Installer::Analyzer.any_instance.expects(:update=).with(true)
@installer.send(:analyze)
@installer.aggregate_targets.map(&:name).sort.should == ['Pods']
@installer.aggregate_targets.map(&:name).sort.should == ["Pods-SampleProject", "Pods-SampleProjectTests"]
@installer.pod_targets.map(&:name).sort.should == ['JSONKit']
end
end
......@@ -458,6 +473,7 @@ module Pod
platform :osx, '10.10'
pod 'CargoBay', '2.1.0'
pod 'AFNetworking/NSURLSession', :head
abstract!(false)
end
@installer.stubs(:podfile).returns(podfile)
@installer.stubs(:lockfile).returns(nil)
......
......@@ -321,7 +321,7 @@ module Pod
validator.stubs(:validate_url)
validator.stubs(:validate_screenshots)
podfile = validator.send(:podfile_from_spec, :ios, '5.0')
dependency = podfile.target_definitions['Pods'].dependencies.first
dependency = podfile.target_definitions['App'].dependencies.first
dependency.external_source.key?(:podspec).should.be.true
end
......@@ -358,7 +358,7 @@ module Pod
it 'configures the deployment target' do
podfile = @validator.send(:podfile_from_spec, :ios, '5.0')
target_definition = podfile.target_definitions['Pods']
target_definition = podfile.target_definitions['App']
platform = target_definition.platform
platform.symbolic_name.should == :ios
platform.deployment_target.to_s.should == '5.0'
......@@ -366,13 +366,13 @@ module Pod
it 'includes the use_frameworks! directive' do
podfile = @validator.send(:podfile_from_spec, :ios, '5.0', true)
target_definition = podfile.target_definitions['Pods']
target_definition = podfile.target_definitions['App']
target_definition.uses_frameworks?.should == true
end
it 'includes the use_frameworks!(false) directive' do
podfile = @validator.send(:podfile_from_spec, :ios, '5.0', false)
target_definition = podfile.target_definitions['Pods']
target_definition = podfile.target_definitions['App']
# rubocop:disable Style/DoubleNegation
(!!target_definition.uses_frameworks?).should == false
# rubocop:enable Style/DoubleNegation
......
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