[LocalPod] Fixed clean paths.

Closes #519
Closes #568
This commit is contained in:
Fabio Pelosin
2012-10-04 16:27:43 +02:00
parent 4b3497233a
commit 8e72cbe164
3 changed files with 14 additions and 7 deletions

View File

@@ -56,11 +56,11 @@ describe Pod::LocalPod do
end
it "returns an expanded list the files to clean" do
clean_paths = @pod.clean_paths.map { |p| p.to_s.gsub(/.*Pods\/BananaLib/,'') }
clean_paths = @pod.clean_paths.map { |p| p.to_s.gsub(/.*pods\/bananalib/,'') }
clean_paths.should.include "/.git/config"
# * There are some hidden files on Travis
# * The submodule of the repo (libPusher) can be ignore, to reduce noise of this test
clean_files_without_hidden = clean_paths.reject { |p| p.to_s.include?('/.') || p.to_s.include?('libPusher') }
clean_files_without_hidden = clean_paths.reject { |p| p.to_s.include?('/.') || p.to_s.include?('libpusher') }
clean_files_without_hidden.should == %W[ /sub-dir /sub-dir/sub-dir-2 /sub-dir/sub-dir-2/somefile.txt ]
end
@@ -208,8 +208,9 @@ describe Pod::LocalPod do
/StoreKit/StoreKit_Prefix.pch
/UIKit/UIKit_Prefix.pch
]
computed = @pod.clean_paths.each{ |p| p.gsub!(@pod.root.to_s, '') }
assert_array_equals(expected, computed)
root = @pod.root.to_s.downcase
computed = @pod.clean_paths.each{ |p| p.gsub!(root, '') }
assert_array_equals(expected.map(&:downcase), computed)
end
it "resolves the used files" do