Commit 681eb76a authored by Boris Bügling's avatar Boris Bügling

[Spec] Verify explicit `use_frameworks!` exception

parent 14c2e522
...@@ -380,7 +380,7 @@ module Pod ...@@ -380,7 +380,7 @@ module Pod
if pod_targets.any?(&:uses_swift?) if pod_targets.any?(&:uses_swift?)
raise Informative, 'Pods written in Swift can only be integrated as frameworks; this ' \ raise Informative, 'Pods written in Swift can only be integrated as frameworks; this ' \
'feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt ' \ 'feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt ' \
'in to using it.' 'into using it.'
end end
end end
end end
......
...@@ -194,6 +194,25 @@ module Pod ...@@ -194,6 +194,25 @@ module Pod
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
describe '#verify_framework_usage' do
it 'raises when Swift pods are used without explicit `use_frameworks!`' do
fixture_path = ROOT + 'spec/fixtures'
config.repos_dir = fixture_path + 'spec-repos'
podfile = Pod::Podfile.new do
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
pod 'OrangeFramework', :path => (fixture_path + 'orange-framework').to_s
end
lockfile = generate_lockfile
config.integrate_targets = false
@installer = Installer.new(config.sandbox, podfile, lockfile)
should.raise(Informative) { @installer.install! }.message.should.match /use_frameworks/
end
end
#-------------------------------------------------------------------------#
describe 'Dependencies Resolution' do describe 'Dependencies Resolution' do
describe '#analyze' do describe '#analyze' do
it 'prints a warning if the version of the Lockfile is higher than the one of the executable' do it 'prints a warning if the version of the Lockfile is higher than the one of the executable' do
......
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