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
41bf5bc4
Commit
41bf5bc4
authored
Feb 12, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs Integration] Preserve the results of each test.
parent
6f1519f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
integration_2_spec.rb
spec/integration_2_spec.rb
+9
-8
No files found.
spec/integration_2_spec.rb
View file @
41bf5bc4
...
@@ -86,7 +86,7 @@ end
...
@@ -86,7 +86,7 @@ end
#
#
def
focused_check
(
arguments
,
folder
)
def
focused_check
(
arguments
,
folder
)
copy_files
(
folder
)
copy_files
(
folder
)
executed
=
launch_binary
(
arguments
)
executed
=
launch_binary
(
arguments
,
folder
)
check_with_folder
(
folder
)
if
executed
check_with_folder
(
folder
)
if
executed
end
end
...
@@ -101,11 +101,10 @@ end
...
@@ -101,11 +101,10 @@ end
# the name of the folder of the tests.
# the name of the folder of the tests.
#
#
def
copy_files
(
folder
)
def
copy_files
(
folder
)
TMP_DIR
.
rmtree
if
TMP_DIR
.
exist?
TMP_DIR
.
mkpath
source
=
File
.
expand_path
(
"../integration/
#{
folder
}
/before"
,
__FILE__
)
source
=
File
.
expand_path
(
"../integration/
#{
folder
}
/before"
,
__FILE__
)
FileUtils
.
cp_r
(
Dir
.
glob
(
"
#{
source
}
/*"
),
TMP_DIR
)
destination
=
TMP_DIR
+
folder
destination
.
mkpath
FileUtils
.
cp_r
(
Dir
.
glob
(
"
#{
source
}
/*"
),
destination
)
end
end
# Runs the Pod executable with the given arguments in the temporary directory.
# Runs the Pod executable with the given arguments in the temporary directory.
...
@@ -117,11 +116,11 @@ end
...
@@ -117,11 +116,11 @@ end
# bundler ensuring that the execution is performed in the correct
# bundler ensuring that the execution is performed in the correct
# environment.
# environment.
#
#
def
launch_binary
(
arguments
)
def
launch_binary
(
arguments
,
folder
)
# TODO CP 0.16 doesn't offer the possibility to skip just the installation
# TODO CP 0.16 doesn't offer the possibility to skip just the installation
# of the docs.
# of the docs.
command
=
"
#{
POD_BINARY
}
#{
arguments
}
--verbose --no-color"
command
=
"
#{
POD_BINARY
}
#{
arguments
}
--verbose --no-color"
Dir
.
chdir
(
TMP_DIR
)
do
Dir
.
chdir
(
TMP_DIR
+
folder
)
do
output
=
`
#{
command
}
`
output
=
`
#{
command
}
`
it
"$ pod
#{
arguments
}
"
do
it
"$ pod
#{
arguments
}
"
do
$?
.
should
.
satisfy
(
"Pod binary failed
\n\n
#{
output
}
"
)
do
$?
.
should
.
satisfy
(
"Pod binary failed
\n\n
#{
output
}
"
)
do
...
@@ -150,7 +149,7 @@ def check_with_folder(folder)
...
@@ -150,7 +149,7 @@ def check_with_folder(folder)
next
unless
File
.
file?
(
expected_path
)
next
unless
File
.
file?
(
expected_path
)
relative_path
=
expected_path
.
gsub
(
"
#{
source
}
/after/"
,
''
)
relative_path
=
expected_path
.
gsub
(
"
#{
source
}
/after/"
,
''
)
expected
=
Pathname
.
new
(
expected_path
)
expected
=
Pathname
.
new
(
expected_path
)
produced
=
TMP_DIR
+
relative_path
produced
=
TMP_DIR
+
folder
+
relative_path
case
expected_path
case
expected_path
when
%r[/xcuserdata/]
when
%r[/xcuserdata/]
...
@@ -260,6 +259,8 @@ end
...
@@ -260,6 +259,8 @@ end
describe
"Integration take 2"
do
describe
"Integration take 2"
do
TMP_DIR
.
rmtree
if
TMP_DIR
.
exist?
TMP_DIR
.
mkpath
describe
"Pod install"
do
describe
"Pod install"
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