Commit c2ebd3c6 authored by Fabio Pelosin's avatar Fabio Pelosin

[Integration] Move code around

parent 559b81d4
......@@ -37,7 +37,6 @@
#-----------------------------------------------------------------------------#
# The spec helper is not required on purpose to keep those tests segregated.
# It would also create issues because it clears the temp folder before every
# requirement (`it` call).
......@@ -64,35 +63,6 @@ POD_BINARY = "ruby " + ROOT.to_s + '/bin/pod' unless defined? POD_BINARY
#-----------------------------------------------------------------------------#
# @!group Description implementation
# Performs the checks for the test with the given folder using the given
# arguments.
#
# @parma [String] arguments
# The arguments to pass to the Pod executable.
#
# @parma [String] folder
# The name of the folder which contains the `before` and `after`
# subfolders.
#
def check(arguments, folder)
focused_check(arguments, folder)
end
# Shortcut to focus on a test. Just comment the implmentation of #check and
# call this from the relevant test.
#
def focused_check(arguments, folder)
copy_files(folder)
executed = launch_binary(arguments, folder)
run_post_execution_actions(folder)
check_with_folder(folder) if executed
end
#--------------------------------------#
# @!group Helpers
# Copies the before subdirectory of the given tests folder in the temporary
......@@ -290,9 +260,35 @@ def file_should_match(expected, produced)
end
end
#-----------------------------------------------------------------------------#
# @!group Description implementation
# Performs the checks for the test with the given folder using the given
# arguments.
#
# @parma [String] arguments
# The arguments to pass to the Pod executable.
#
# @parma [String] folder
# The name of the folder which contains the `before` and `after`
# subfolders.
#
def check(arguments, folder)
focused_check(arguments, folder)
end
# Shortcut to focus on a test: Comment the implmentation of #check and
# call this from the relevant test.
#
def focused_check(arguments, folder)
copy_files(folder)
executed = launch_binary(arguments, folder)
run_post_execution_actions(folder)
check_with_folder(folder) if executed
end
#-----------------------------------------------------------------------------#
describe "Integration take 2" do
TMP_DIR.rmtree if TMP_DIR.exist?
......@@ -300,6 +296,9 @@ describe "Integration take 2" do
describe "Pod install" do
# Test installation with no integration
# Test subspecs inheritance
describe "Integrates a project with CocoaPods" do
check "install --no-update --no-doc", "install_new"
end
......
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