Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
681eb76a
Commit
681eb76a
authored
Feb 24, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Verify explicit `use_frameworks!` exception
parent
14c2e522
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
installer.rb
lib/cocoapods/installer.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+19
-0
No files found.
lib/cocoapods/installer.rb
View file @
681eb76a
...
@@ -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
...
...
spec/unit/installer_spec.rb
View file @
681eb76a
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment