Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Commit

Permalink
Add test code for multiple file support.
Browse files Browse the repository at this point in the history
  • Loading branch information
devxoul committed Jul 2, 2015
1 parent d37d1c6 commit 29b0209
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/test_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,34 @@ def test_install
end
end

def test_install_multiple_files
seedfile %{
github "devxoul/JLToast", "1.2.2",
:files => ["JLToast/JLToast.h", "JLToast/JLToast.swift"]
}
@seed.install

assert\
File.exists?(File.join(@seeds_dirname, "JLToast")),
"Directory Seeds/JLToast not exists."

refute_nil\
self.project["Seeds"]["JLToast"],
"Group 'Seeds/JLToast' not exists in the project."

self.project["Seeds"]["JLToast"].files.each do |file|
assert_match /.*\.(h|swift)/, file.name
end

self.project.targets.each do |target|
phase = target.sources_build_phase
assert phase.files.length > 0
phase.file_display_names.each do |filename|
assert_match /.*\.(h|swift)/, filename
end
end
end

def test_install_target
seedfile %{
target :TestProjTests do
Expand Down

0 comments on commit 29b0209

Please sign in to comment.