Commit b1d0154e authored by Michele's avatar Michele

Fixing more tests to look for files in the correct spots.

parent a088a783
...@@ -87,14 +87,6 @@ module Pod ...@@ -87,14 +87,6 @@ module Pod
# #
attr_accessor :project attr_accessor :project
# Removes the sandbox.
#
# @return [void]
#
def implode
generated_dir_root.rmtree
end
# Removes the files of the Pod with the given name from the sandbox. # Removes the files of the Pod with the given name from the sandbox.
# #
# @return [void] # @return [void]
......
...@@ -76,9 +76,9 @@ module Pod ...@@ -76,9 +76,9 @@ module Pod
it "generates the libraries which represent the target definitions" do it "generates the libraries which represent the target definitions" do
libs = @analyzer.analyze.libraries libs = @analyzer.analyze.libraries
libs.map(&:name).should == ['Pods/Generated'] libs.map(&:name).should == ['Pods']
lib = libs.first lib = libs.first
lib.support_files_root.should == config.sandbox.root lib.support_files_root.should == config.sandbox.generated_dir_root
lib.user_project_path.to_s.should.include 'SampleProject/SampleProject' lib.user_project_path.to_s.should.include 'SampleProject/SampleProject'
lib.client_root.to_s.should.include 'SampleProject' lib.client_root.to_s.should.include 'SampleProject'
......
...@@ -77,27 +77,27 @@ module Pod ...@@ -77,27 +77,27 @@ module Pod
@project.add_file_references(source_files, 'BananaLib', @project.pods) @project.add_file_references(source_files, 'BananaLib', @project.pods)
group = @project['Pods/BananaLib'] group = @project['Pods/BananaLib']
group.should.not.be.nil group.should.not.be.nil
group.children.map(&:path).should == [ "A_POD/some_file.m" ] group.children.map(&:path).should == [ "Sources/A_POD/some_file.m" ]
end end
it "adds the only one file reference for a given absolute path" do it "adds the only one file reference for a given absolute path" do
source_files = [ config.sandbox.root + "A_POD/some_file.m" ] source_files = [ config.sandbox.pod_dir("A_POD") + "some_file.m" ]
@project.add_file_references(source_files, 'BananaLib', @project.pods) @project.add_file_references(source_files, 'BananaLib', @project.pods)
@project.add_file_references(source_files, 'BananaLib', @project.pods) @project.add_file_references(source_files, 'BananaLib', @project.pods)
group = @project['Pods/BananaLib'] group = @project['Pods/BananaLib']
group.children.count.should == 1 group.children.count.should == 1
group.children.first.path.should == "A_POD/some_file.m" group.children.first.path.should == "Sources/A_POD/some_file.m"
end end
it "returns the file reference for a given source file" do it "returns the file reference for a given source file" do
file = config.sandbox.root + "A_POD/some_file.m" file = config.sandbox.pod_dir("A_POD") + "some_file.m"
@project.add_file_references([file], 'BananaLib', @project.pods) @project.add_file_references([file], 'BananaLib', @project.pods)
file_reference = @project.file_reference(file) file_reference = @project.file_reference(file)
file_reference.path.should == "A_POD/some_file.m" file_reference.path.should == "Sources/A_POD/some_file.m"
end end
it "adds the Podfile configured as a Ruby file" do it "adds the Podfile configured as a Ruby file" do
@project.add_podfile(config.sandbox.root + '../Podfile') @project.add_podfile(config.sandbox.generated_dir_root + '../Podfile')
f = @project['Podfile'] f = @project['Podfile']
f.name.should == 'Podfile' f.name.should == 'Podfile'
f.source_tree.should == 'SOURCE_ROOT' f.source_tree.should == 'SOURCE_ROOT'
......
...@@ -31,11 +31,6 @@ module Pod ...@@ -31,11 +31,6 @@ module Pod
@sandbox.build_headers.root.should == temporary_directory + 'Sandbox/Generated/Headers/BuildHeaders' @sandbox.build_headers.root.should == temporary_directory + 'Sandbox/Generated/Headers/BuildHeaders'
end end
it "deletes the entire root directory on implode" do
@sandbox.implode
File.directory?(temporary_directory + 'Sandbox/Generated').should.be.false
end
it "cleans any trace of the Pod with the given name" do it "cleans any trace of the Pod with the given name" do
pod_root = @sandbox.pod_dir('BananaLib') pod_root = @sandbox.pod_dir('BananaLib')
pod_root.mkpath pod_root.mkpath
......
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