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
b1228e70
Commit
b1228e70
authored
May 31, 2015
by
Olivier Halligon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Command::Cache] Fixtures
parent
c4f12885
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
.gitignore
.gitignore
+1
-0
cache.tar.gz
spec/fixtures/cache.tar.gz
+0
-0
spec_helper.rb
spec/spec_helper.rb
+1
-0
temporary_cache.rb
spec/spec_helper/temporary_cache.rb
+28
-0
No files found.
.gitignore
View file @
b1228e70
...
@@ -21,6 +21,7 @@ spec/fixtures/banana-lib
...
@@ -21,6 +21,7 @@ spec/fixtures/banana-lib
spec/fixtures/chameleon
spec/fixtures/chameleon
spec/fixtures/integration/Headers/
spec/fixtures/integration/Headers/
spec/fixtures/vcr
spec/fixtures/vcr
spec/fixtures/cache/CocoaPods
# Examples
# Examples
examples/**/Podfile.lock
examples/**/Podfile.lock
...
...
spec/fixtures/cache.tar.gz
0 → 100644
View file @
b1228e70
File added
spec/spec_helper.rb
View file @
b1228e70
...
@@ -41,6 +41,7 @@ require 'claide'
...
@@ -41,6 +41,7 @@ require 'claide'
require
'spec_helper/command'
# Allows to run Pod commands and returns their output.
require
'spec_helper/command'
# Allows to run Pod commands and returns their output.
require
'spec_helper/fixture'
# Provides access to the fixtures and unpacks them if needed.
require
'spec_helper/fixture'
# Provides access to the fixtures and unpacks them if needed.
require
'spec_helper/temporary_repos'
# Allows to create and modify temporary spec repositories.
require
'spec_helper/temporary_repos'
# Allows to create and modify temporary spec repositories.
require
'spec_helper/temporary_cache'
# Allows to create temporary cache directory.
require
'spec_helper/user_interface'
# Redirects UI to UI.output & UI.warnings.
require
'spec_helper/user_interface'
# Redirects UI to UI.output & UI.warnings.
require
'spec_helper/pre_flight'
# Cleans the temporary directory, the config & the UI.output before every test.
require
'spec_helper/pre_flight'
# Cleans the temporary directory, the config & the UI.output before every test.
...
...
spec/spec_helper/temporary_cache.rb
0 → 100644
View file @
b1228e70
require
File
.
expand_path
(
'../fixture'
,
__FILE__
)
module
SpecHelper
module
TemporaryCache
# Sets up a lighweight cache in `tmp/cocoapods/cache` with the
# contents of `spec/fixtures/cache/CocoaPods`.
#
def
set_up_test_cache
require
'fileutils'
fixture_path
=
SpecHelper
::
Fixture
.
fixture
(
'cache'
)
destination
=
SpecHelper
.
temporary_directory
+
'cocoapods'
FileUtils
.
rm_rf
(
destination
)
destination
.
mkpath
FileUtils
.
cp_r
(
fixture_path
,
destination
)
# Add version file so that the cache isn't imploded on version mismatch
# (We don't include it in the tar.gz as we don't want to regenerate it each time)
version_file
=
tmp_cache_path
+
'Pods/VERSION'
version_file
.
open
(
'w'
)
{
|
f
|
f
<<
Pod
::
VERSION
}
end
def
tmp_cache_path
SpecHelper
.
temporary_directory
+
'cocoapods/cache/CocoaPods'
end
module_function
:set_up_test_cache
,
:tmp_cache_path
end
end
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