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

Commit

Permalink
Add tests for common seeds with separated targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
devxoul committed May 13, 2015
1 parent bc10c56 commit 610c318
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/test_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,48 @@ def test_install_separated_target
refute self.phase(:TestProjTests).include_filename?(/JLToast.*\.(h|swift)/)
end

def test_install_common_before_separated_target
seedfile %{
github "devxoul/JLToast", "1.2.2", :files => "JLToast/*.{h,swift}"
target :TestProjTests do
github "devxoul/SwipeBack", "1.0.4", :files => "SwipeBack/*.{h,m}"
end
}
@seed.install

assert\
self.phase(:TestProj).include_filename?(/JLToast.*\.(h|swift)/),
"TestProj should have JLToast files."
assert\
self.phase(:TestProjTests).include_filename?(/.*SwipeBack\.(h|m)/),
"TestProjTests should have SwipeBack files."
assert\
self.phase(:TestProjTests).include_filename?(/JLToast.*\.(h|swift)/),
"TestProjTests should have JLToast files."
end

def test_install_common_after_separated_target
seedfile %{
target :TestProjTests do
github "devxoul/SwipeBack", "1.0.4", :files => "SwipeBack/*.{h,m}"
end
github "devxoul/JLToast", "1.2.2", :files => "JLToast/*.{h,swift}"
}
@seed.install

assert\
self.phase(:TestProj).include_filename?(/JLToast.*\.(h|swift)/),
"TestProj should have JLToast files."
assert\
self.phase(:TestProjTests).include_filename?(/.*SwipeBack\.(h|m)/),
"TestProjTests should have SwipeBack files."
assert\
self.phase(:TestProjTests).include_filename?(/JLToast.*\.(h|swift)/),
"TestProjTests should have JLToast files."
end

def test_remove
seedfile %{
github "devxoul/JLToast", "1.2.2", :files => "JLToast/*.{h,swift}"
Expand Down

0 comments on commit 610c318

Please sign in to comment.